当前位置: 首页>>代码示例>>C#>>正文


C# IPropertyInfo类代码示例

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


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


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