• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# PropertyHolder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中PropertyHolder的典型用法代码示例。如果您正苦于以下问题:C# PropertyHolder类的具体用法?C# PropertyHolder怎么用?C# PropertyHolder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PropertyHolder类属于命名空间,在下文中一共展示了PropertyHolder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: IntegerListProperty

 public IntegerListProperty(PropertyHolder parent, string name)
   : base(parent, name)
 {
   IntegerListProperty integerListProperty = this;
   this.valueSplit = ", ";
   this.delimiter = ",";
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:7,代码来源:IntegerListProperty.cs


示例2: LoadedScene

 internal LoadedScene(string name, PropertyHolder values, SceneLoader loader, Game game, LoaderUtility loaderUtil)
     : base(values, loaderUtil)
 {
     Loader = loader;
     Game = game;
     Name = name;
 }
开发者ID:kinectitude,项目名称:kinectitude,代码行数:7,代码来源:LoadedScene.cs


示例3: FileProperty

 public FileProperty(PropertyHolder parent, string name, string defaultValue)
   : base((Class) ClassLiteral<String>.Value, parent, name, (object) defaultValue)
 {
   FileProperty fileProperty = this;
   JFileChooser.__\u003Cclinit\u003E();
   this.chooser = new JFileChooser((string) this.getValue());
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:7,代码来源:FileProperty.cs


示例4: Main

    public static int Main(string[] args)
    {
        PropertyHolder propHold = new PropertyHolder(5);

        Console.WriteLine("Property Value: {0}", propHold.SomeProperty);

        return 0;
    }
开发者ID:JeremiahZhang,项目名称:AKA,代码行数:8,代码来源:ReadOnlyProperty.cs


示例5: BooleanProperty

 public BooleanProperty(PropertyHolder element, string name)
   : base((Class) ClassLiteral<Boolean>.Value, element, name)
 {
   BooleanProperty booleanProperty = this;
   this.box = new JCheckBox();
   this.checkbox = new DefaultCellEditor(this.box);
   this.renderer = (TableCellRenderer) new BooleanProperty\u00241(this);
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:8,代码来源:BooleanProperty.cs


示例6: Main

    public static int Main(string[] args)
    {
        PropertyHolder propHold = new PropertyHolder();

        propHold.SomeProperty = 5;

        return 0;
    }
开发者ID:JeremiahZhang,项目名称:AKA,代码行数:8,代码来源:WriteOnlyProperty.cs


示例7: Property

 protected internal Property(PropertyHolder element, string name)
 {
   base.\u002Ector();
   Property property = this;
   this.element = element;
   this.name = name;
   element.getProperties().put((object) name, (object) this);
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:8,代码来源:Property.cs


示例8: AutoDataProvidesMultipleObjects

        public void AutoDataProvidesMultipleObjects(PropertyHolder<Version> ph, SingleParameterType<OperatingSystem> spt)
        {
            Assert.NotNull(ph);
            Assert.NotNull(ph.Property);

            Assert.NotNull(spt);
            Assert.NotNull(spt.Parameter);
        }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:8,代码来源:Scenario.cs


示例9: MultiProperty

 public MultiProperty(PropertyHolder holder, string name)
   : base(holder, name)
 {
   MultiProperty multiProperty = this;
   this.comboBox = new JComboBox();
   this.cellEditor = new DefaultCellEditor(this.comboBox);
   this.values = (Map) new HashMap();
   this.renderer = (TableCellRenderer) new MultiProperty\u00241(this);
 }
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:9,代码来源:MultiProperty.cs


示例10: SutIsGuardClauseCommand

 public void SutIsGuardClauseCommand()
 {
     // Fixture setup
     var dummyOwner = new PropertyHolder<object>();
     var dummyProperty = dummyOwner.GetType().GetProperty("Property");
     // Exercise system
     var sut = new PropertySetCommand(dummyProperty, dummyOwner);
     // Verify outcome
     Assert.IsAssignableFrom<IGuardClauseCommand>(sut);
     // Teardown
 }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:11,代码来源:PropertySetCommandTest.cs


示例11: GetProperties

        public PropertyHolder GetProperties(ParseTreeNode node)
        {
            PropertyHolder propertyHolder = new PropertyHolder();

            if (grammar.Prototype == node.Term || grammar.Entity == node.Term)
                node = node.ChildNodes.First(child => child.Term == grammar.EntityDefinition);

            foreach (ParseTreeNode property in grammar.GetOfType(node, grammar.Properties))
                propertyHolder.AddValue(property.ChildNodes[0].Token.ValueString, property.ChildNodes[1]);

            return propertyHolder;
        }
开发者ID:kinectitude,项目名称:kinectitude,代码行数:12,代码来源:KGLBase.cs


示例12: PropertyInfoIsCorrect

 public void PropertyInfoIsCorrect()
 {
     // Fixture setup
     var dummyOwner = new PropertyHolder<object>();
     var propertyInfo = dummyOwner.GetType().GetProperty("Property");
     var sut = new PropertySetCommand(propertyInfo, dummyOwner);
     // Exercise system
     PropertyInfo result = sut.PropertyInfo;
     // Verify outcome
     Assert.Equal(propertyInfo, result);
     // Teardown
 }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:12,代码来源:PropertySetCommandTest.cs


示例13: OwnerIsCorrect

 public void OwnerIsCorrect()
 {
     // Fixture setup
     var owner = new PropertyHolder<object>();
     var dummyProperty = owner.GetType().GetProperty("Property");
     var sut = new PropertySetCommand(dummyProperty, owner);
     // Exercise system
     var result = sut.Owner;
     // Verify outcome
     Assert.Equal(owner, result);
     // Teardown
 }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:12,代码来源:PropertySetCommandTest.cs


示例14: RequestedTypeIsCorrect

 public void RequestedTypeIsCorrect()
 {
     // Fixture setup
     var dummyOwner = new PropertyHolder<Version>();
     var property = dummyOwner.GetType().GetProperty("Property");
     var sut = new PropertySetCommand(property, dummyOwner);
     // Exercise system
     var result = sut.RequestedType;
     // Verify outcome
     Assert.Equal(property.PropertyType, result);
     // Teardown
 }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:12,代码来源:PropertySetCommandTest.cs


示例15: ExecuteAssignsValueToOwnerProperty

 public void ExecuteAssignsValueToOwnerProperty()
 {
     // Fixture setup
     var owner = new PropertyHolder<object>();
     var property = owner.GetType().GetProperty("Property");
     var sut = new PropertySetCommand(property, owner);
     var value = new object();
     // Exercise system
     sut.Execute(value);
     // Verify outcome
     Assert.Equal(value, owner.Property);
     // Teardown
 }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:13,代码来源:PropertySetCommandTest.cs


示例16: CreateExceptionReturnsExceptionWithCorrectMessage

 public void CreateExceptionReturnsExceptionWithCorrectMessage()
 {
     // Fixture setup
     var dummyOwner = new PropertyHolder<Version>();
     var dummyProperty = dummyOwner.GetType().GetProperty("Property");
     var sut = new PropertySetCommand(dummyProperty, dummyOwner);
     // Exercise system
     var message = Guid.NewGuid().ToString();
     var result = sut.CreateException(message);
     // Verify outcome
     var e = Assert.IsAssignableFrom<GuardClauseException>(result);
     Assert.Contains(message, e.Message);
     // Teardown
 }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:14,代码来源:PropertySetCommandTest.cs


示例17: ExecuteWillAssignCorrectPropertyValue

        public void ExecuteWillAssignCorrectPropertyValue()
        {
            // Fixture setup
            var expectedPropertyValue = new object();
            var container = new DelegatingSpecimenContext { OnResolve = r => expectedPropertyValue };

            var sut = new AutoPropertiesCommand<PropertyHolder<object>>();

            var specimen = new PropertyHolder<object>();
            // Exercise system
            sut.Execute(specimen, container);
            // Verify outcome
            Assert.Equal(expectedPropertyValue, specimen.Property);
            // Teardown
        }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:15,代码来源:AutoPropertiesCommandTest.cs


示例18: PrintDescription

        private static void PrintDescription(String propName, PropertyHolder prop, OutputDevice output)
        {
            if (prop.ShortDescription != null) {
                output.WriteBold("PROPERTY");
                output.WriteLine();
                output.WriteLine("\t" + propName + " : " + prop.ShortDescription);
                output.WriteLine();
            }

            String desc = prop.LongDescription;
            if (desc != null) {
                output.WriteBold("DESCRIPTION");
                output.WriteLine();
                output.WriteLine(desc);
            } else {
                output.WriteLine("no detailed help for '" + propName + "'");
            }
        }
开发者ID:deveel,项目名称:dshell,代码行数:18,代码来源:ShowPropertyCommand.cs


示例19: LoadedEntity

        internal LoadedEntity(string name, PropertyHolder values, int id, IEnumerable<string> prototypes, LoaderUtility loaderUtil)
            : base(values, loaderUtil)
        {
            Name = name;
            this.id = id;
            foreach (string prototype in prototypes)
            {
                isExactType.Add(prototype);
                isType.Add(prototype);
                isType.AddRange(Prototypes[prototype].isType);
            }

            //it is a prototype
            #if !TEST
            if(name != null && Prototypes.ContainsKey(name)) Game.CurrentGame.Die("The prototype " + name + " was already defined");
            #endif
            if (id < 0) Prototypes[name] = this;
        }
开发者ID:kinectitude,项目名称:kinectitude,代码行数:18,代码来源:LoadedEntity.cs


示例20: GetLoadedManager

        internal static LoadedManager GetLoadedManager(string type, LoadedScene ls, PropertyHolder values, LoaderUtility loaderUtil)
        {
            Dictionary<string, LoadedManager> managersByName;

            if(!ManagerMap.TryGetValue(ls, out managersByName))
            {
                ManagerMap[ls] =  managersByName = new Dictionary<string, LoadedManager>();
            }

            LoadedManager loadedManager;
            if (!managersByName.TryGetValue(type, out loadedManager))
            {
                loadedManager = new LoadedManager(type, values, loaderUtil);
                managersByName[type] = loadedManager;
            }
            else
            {
                if (values != null) loadedManager.Values.AddRange(values);
            }
            return loadedManager;
        }
开发者ID:kinectitude,项目名称:kinectitude,代码行数:21,代码来源:LoadedManager.cs



注:本文中的PropertyHolder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PropertyInfo类代码示例发布时间:2022-05-24
下一篇:
C# PropertyGetterEventArgs类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap