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

C# IPropertyInfo类代码示例

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

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



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

示例1: StopIfNotFieldExists

 /// <summary>
 /// Initializes a new instance of the <see cref="StopIfNotFieldExists"/> class.
 /// </summary>
 /// <param name="primaryProperty">Primary property for this rule.</param>
 public StopIfNotFieldExists(IPropertyInfo primaryProperty)
   : base(primaryProperty)
 {
   if (InputProperties == null)
     InputProperties = new List<IPropertyInfo>();
   InputProperties.Add(primaryProperty);
 }
开发者ID:Jaans,项目名称:csla,代码行数:11,代码来源:StopIfNotFieldExists.cs


示例2: FrequencyHoursShouldBeGreaterThanZeroRule

 /// <summary>
 /// Initializes a new instance of the <see cref="FrequencyHoursShouldBeGreaterThanZeroRule"/> class.
 /// </summary>
 /// <param name="hoursProperty">The hours property.</param>
 /// <param name="frequencyTypePorperty">The frequency type property.</param>
 /// <param name="frequencyFieldName">Name of the frequency field.</param>
 public FrequencyHoursShouldBeGreaterThanZeroRule(IPropertyInfo hoursProperty, IPropertyInfo frequencyTypePorperty, string frequencyFieldName) : base(hoursProperty)
 {
     InputProperties = new List<IPropertyInfo> { hoursProperty, frequencyTypePorperty };
     _frequencyTypeProperty = frequencyTypePorperty;
     _frequencyFieldName = frequencyFieldName;
     RuleUri.AddQueryParameter("frequencyFieldName", frequencyFieldName);
 }
开发者ID:mparsin,项目名称:Elements,代码行数:13,代码来源:FrequencyHoursShouldBeGreaterThanZeroRule.cs


示例3: DefaultActivityStatus

        public DefaultActivityStatus(IPropertyInfo activityIdProperty, IPropertyInfo activityStatusProperty, IPropertyInfo approvedByIdProperty)
            : base(activityIdProperty)
        {
            if (activityIdProperty == null)
            {
                throw new ArgumentException("activityIdProperty cannot be null.");
            }
            if (activityStatusProperty == null)
            {
                throw new ArgumentException("activityStatusProperty cannot be null.");
            }
            if (approvedByIdProperty == null)
            {
                throw new ArgumentException("approvedByIdProperty cannot be null.");
            }
            if (activityIdProperty.Type != typeof(int))
            {
                throw new ArgumentException("activityIdProperty must be an int.");
            }
            if (activityStatusProperty.Type != typeof(ActivitySubmissionStatus))
            {
                throw new ArgumentException("activityStatusProperty must be a Common.Enums.ActivitySubmissionStatus.");
            }
            if (approvedByIdProperty.Type != typeof(int))
            {
                throw new ArgumentException("approvedByIdProperty must be a Common.Enums.ActivitySubmissionStatus.");
            }

            this.StatusName = activityStatusProperty.Name;
            this.ApprovedByIdName = approvedByIdProperty.Name;
            this.InputProperties = new List<IPropertyInfo> { activityIdProperty, activityStatusProperty, approvedByIdProperty };
            this.AffectedProperties.Add(activityStatusProperty);
        }
开发者ID:Bowman74,项目名称:Badge-Application,代码行数:33,代码来源:DefaultActivityStatus.cs


示例4: GreaterThanOrEqual

 /// <summary>
 /// Initializes a new instance of the <see cref="GreaterThanOrEqual"/> class.
 /// </summary>
 /// <param name="primaryProperty">
 /// The primary property.
 /// </param>
 /// <param name="compareToProperty">
 /// The compare to property.
 /// </param>
 public GreaterThanOrEqual(IPropertyInfo primaryProperty, IPropertyInfo compareToProperty)
   : base(primaryProperty)
 {
   CompareTo = compareToProperty;
   InputProperties = new List<IPropertyInfo>() { primaryProperty, compareToProperty };
   this.RuleUri.AddQueryParameter("compareTo", compareToProperty.Name);
 }
开发者ID:GavinHwa,项目名称:csla,代码行数:16,代码来源:GreaterThanOrEqual.cs


示例5: ResultFieldValidationRule

 /// <summary>
 /// Initializes a new instance of the <see cref="ResultFieldValidationRule"/> class.
 /// </summary>
 /// <param name="idProperty">The identifier property.</param>
 /// <param name="resultProperty">The result property.</param>
 /// <param name="resultListProperty">The result list property.</param>
 public ResultFieldValidationRule(IPropertyInfo idProperty, IPropertyInfo resultProperty, IPropertyInfo resultListProperty)
     : base(idProperty)
 {
     _resultProperty = resultProperty;
     _resultListProperty = resultListProperty;
     InputProperties = new List<IPropertyInfo> { idProperty, resultProperty, resultListProperty };
 }
开发者ID:mparsin,项目名称:Elements,代码行数:13,代码来源:ResultFieldValidationRule.cs


示例6: AnyRequired

 public AnyRequired(IPropertyInfo primaryProperty, params IPropertyInfo[] additionalProperties)
   : base(primaryProperty)
 {
   InputProperties = new List<IPropertyInfo>() {primaryProperty};
   InputProperties.AddRange(additionalProperties);
   this.RuleUri.AddQueryParameter("any", string.Join(",", additionalProperties.Select(p => p.Name).ToArray()));
 }
开发者ID:nschonni,项目名称:csla-svn,代码行数:7,代码来源:AnyRequired.cs


示例7: PropertyRule

 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyRule"/> class.
 /// </summary>
 /// <param name="propertyInfo">The property info.</param>
 protected PropertyRule(IPropertyInfo propertyInfo)
     : base(propertyInfo)
 {
     CanRunAsAffectedProperty = true;
       CanRunOnServer = true;
       CanRunInCheckRules = true;
 }
开发者ID:Jaans,项目名称:csla,代码行数:11,代码来源:PropertyRule.cs


示例8: CollectionMinimumCountBusinessRule

 public CollectionMinimumCountBusinessRule(IPropertyInfo collectionProperty, int minCount)
     : base(collectionProperty)
 {
     PrimaryProperty = collectionProperty;
       InputProperties = new List<IPropertyInfo>() { collectionProperty };
       _MinCount = minCount;
 }
开发者ID:haisreekanth,项目名称:LearnLanguages,代码行数:7,代码来源:CollectionMinimumCountBusinessRule.cs


示例9: AsyncLookupRule

 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncLookupRule"/> class.
 /// </summary>
 /// <param name="primaryProperty">Primary property for this rule.</param>
 protected AsyncLookupRule(IPropertyInfo primaryProperty) : base(primaryProperty)
 {
   IsAsync = true;
   CanRunAsAffectedProperty = false;
   CanRunInCheckRules = false;
   CanRunOnServer = false;
 }
开发者ID:nschonni,项目名称:csla-svn,代码行数:11,代码来源:AsyncLookupRule.cs


示例10: SetStateName

 public SetStateName(IPropertyInfo stateIdProperty, IPropertyInfo stateNameProperty)
   : base(stateIdProperty)
 {
   StateName = stateNameProperty;
   InputProperties = new List<IPropertyInfo> { stateIdProperty };
   AffectedProperties.Add(StateName);
 }
开发者ID:BiYiTuan,项目名称:csla,代码行数:7,代码来源:SetStateName.cs


示例11: NoDuplicates

        public NoDuplicates(IPropertyInfo primaryProperty, IPropertyInfo idProperty, CheckForDuplicates duplicateCommand)
            : base(primaryProperty)
        {
            if (primaryProperty == null)
            {
                throw new ArgumentException("primaryProperty cannot be null.");
            }
            if (idProperty == null)
            {
                throw new ArgumentException("idProperty cannot be null.");
            }
            if (duplicateCommand == null)
            {
                throw new ArgumentException("duplicateCommand cannot be null.");
            }
            if (primaryProperty.Type != typeof(string))
            {
                throw new ArgumentException("primaryProperty must be a string.");
            }
            if (idProperty.Type != typeof(int))
            {
                throw new ArgumentException("idProperty must be an int.");
            }

            this.IdPropertyName = idProperty.Name;
            this.InputProperties = new List<IPropertyInfo> { primaryProperty, idProperty };
            this.DuplicateCommand = duplicateCommand;
        }
开发者ID:Bowman74,项目名称:Badge-Application,代码行数:28,代码来源:NoDuplicates.cs


示例12: ParameterNameIsRequired

            /// <summary>
            /// Initializes a new instance of the <see cref="ParameterNameIsRequired"/> class.
            /// </summary>
            /// <param name="systemParameterListProperty">The system parameter list property.</param>
            public ParameterNameIsRequired(IPropertyInfo systemParameterListProperty): base(systemParameterListProperty)
            {
                this.InputProperties = new List<IPropertyInfo> {systemParameterListProperty};

                _required = new Csla.Rules.CommonRules.Required(systemParameterListProperty);
                RuleUri.AddQueryParameter("rule", System.Uri.EscapeUriString(_required.RuleName));
            }
开发者ID:mparsin,项目名称:Elements,代码行数:11,代码来源:SystemParametesValidationRule.cs


示例13: PropertyXCanNotBeEmptyIfPropertyYHasValue

 public PropertyXCanNotBeEmptyIfPropertyYHasValue(IPropertyInfo primaryProperty, IPropertyInfo dependentProperty)
     : base(primaryProperty)
 {
     InputProperties = new List<IPropertyInfo> {primaryProperty, dependentProperty};
     DependentProperty = dependentProperty;
     MessageText = ResourcesValidation.PropertyXCantBeEmptyIfPropertyYHasValue;
 }
开发者ID:nttung91,项目名称:PLSoft,代码行数:7,代码来源:PropertyXCanNotBeEmptyIfPropertyYHasValue.cs


示例14: DefaultBadgeStatus

        public DefaultBadgeStatus(IPropertyInfo badgeTypeProperty, IPropertyInfo badgeStatusProperty, IPropertyInfo approvedByIdProperty)
            : base(badgeTypeProperty)
        {
            if (badgeTypeProperty == null)
            {
                throw new ArgumentException("badgeIdProperty cannot be null.");
            }
            if (badgeStatusProperty == null)
            {
                throw new ArgumentException("badgeStatusProperty cannot be null.");
            }
            if (approvedByIdProperty == null)
            {
                throw new ArgumentException("approvedByIdProperty cannot be null.");
            }
            if (badgeTypeProperty.Type != typeof(BadgeType))
            {
                throw new ArgumentException("badgeTypeProperty must be a Common.Enums.BadgeType.");
            }
            if (badgeStatusProperty.Type != typeof(BadgeStatus))
            {
                throw new ArgumentException("badgeStatusProperty must be a Common.Enums.BadgeStatus.");
            }
            if (approvedByIdProperty.Type != typeof(int))
            {
                throw new ArgumentException("approvedByIdProperty must be an int.");
            }

            this.StatusName = badgeStatusProperty.Name;
            this.ApprovedByIdName = approvedByIdProperty.Name;
            this.InputProperties = new List<IPropertyInfo> { badgeTypeProperty, badgeStatusProperty, approvedByIdProperty };
            this.AffectedProperties.Add(badgeStatusProperty);
        }
开发者ID:Bowman74,项目名称:Badge-Application,代码行数:33,代码来源:DefaultBadgeStatus.cs


示例15: IsAlreadyLoadingProperty

 private bool IsAlreadyLoadingProperty(IPropertyInfo property)
 {
   lock (_syncRoot)
   {
     return _loading.Any(l => l.Property == property);
   }
 }
开发者ID:Jaans,项目名称:csla,代码行数:7,代码来源:AsyncLoadManager.cs


示例16: UnresolvedPropertyInfo

        internal UnresolvedPropertyInfo(IPropertyInfo adapter)
        {
            if (adapter == null)
                throw new ArgumentNullException("adapter");

            this.adapter = adapter;
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:7,代码来源:UnresolvedPropertyInfo.cs


示例17: RequiredFieldRule

 /// <summary>
 /// Initializes a new instance of the <see cref="RequiredFieldRule"/> class. 
 /// </summary>
 /// <param name="primaryProperty">
 /// Primary property for this rule.
 /// </param>
 public RequiredFieldRule(IPropertyInfo primaryProperty)
     : base(primaryProperty)
 {
     // Don't add the primary property to the InputProperties collection so that
     // we don't load the property value if the property is not required in current configuration.
     // This way we can make some heavy fields lazy loaded, for example multi cross-references.
 }
开发者ID:mparsin,项目名称:Elements,代码行数:13,代码来源:RequiredFieldRule.cs


示例18: CollapseWhiteSpace

        /// <summary>
        /// Initializes a new instance of the <see cref="CollapseWhiteSpace"/> class.
        /// </summary>
        /// <param name="primaryProperty">The primary property.</param>
        public CollapseWhiteSpace(IPropertyInfo primaryProperty)
            : base(primaryProperty)
        {
            InputProperties = new List<IPropertyInfo> {primaryProperty};

            CanRunOnServer = false;
        }
开发者ID:tfreitasleal,项目名称:MvvmFx,代码行数:11,代码来源:CollapseWhiteSpace.cs


示例19: CalcSum

 /// <summary>
 /// Initializes a new instance of the <see cref="CalcSum"/> class.
 /// </summary>
 /// <param name="primaryProperty">
 /// The primary property.
 /// </param>
 /// <param name="inputProperties">
 /// The input properties.
 /// </param>
 public CalcSum(IPropertyInfo primaryProperty, params IPropertyInfo[] inputProperties)
   : base(primaryProperty)
 {
   InputProperties = new List<IPropertyInfo>();
   InputProperties.AddRange(inputProperties);
   this.RuleUri.AddQueryParameter("input", string.Join(",", inputProperties.Select(p => p.Name).ToArray()));
   CanRunOnServer = false;
 }
开发者ID:Jaans,项目名称:csla,代码行数:17,代码来源:CalcSum.cs


示例20: IntegerLessThanOtherInteger

        public IntegerLessThanOtherInteger(IPropertyInfo intFirst, IPropertyInfo intSecond)
            : base(intFirst)
        {
            InputProperties = new List<IPropertyInfo> {intFirst, intSecond};

            IntSecondProperty = intSecond;
            AffectedProperties.Add(intSecond);
        }
开发者ID:nttung91,项目名称:PLSoft,代码行数:8,代码来源:IntegerLessThanOtherInteger.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IPropertyInstance类代码示例发布时间:2022-05-24
下一篇:
C# IPropertyDefinition类代码示例发布时间: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