⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 brokenrule.cs

📁 改程序能够查询课程表
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;

namespace Common.Utility.Validation
{
   /// <summary>
   /// Object representing a broken validation rule
   /// </summary>
   [Serializable()]
   public class BrokenRule
   {
      private string _ruleName;
      private string _description;
      private string _property;
	  
	  /// <summary>
	  /// Default parameterless constructor used by Reflection for Soap Serialization
	  /// </summary>
	  private BrokenRule()
	  {
		 // used by Reflection.
	  }
	
      /// <summary>
      /// Creates a instance of the object.
      /// </summary>
      /// <param name="rule"><see cref="ValidationRuleInfo"/> containing the details about the rule that was broken.</param>
      internal BrokenRule(ValidationRuleInfo rule)
      {
         _ruleName = rule.RuleName;
         _description = rule.ValidationRuleArgs.Description;
         _property = rule.ValidationRuleArgs.PropertyName;
      }

      /// <summary>
      /// Provides access to the name of the broken rule.
      /// </summary>
      /// <value>The name of the rule.</value>
      public string RuleName
      {
         get { return _ruleName; }
      }

      /// <summary>
      /// The description of the broken rule.
      /// </summary>
      /// <value>The description of the rule.</value>
      public string Description
      {
         get { return _description; }
      }

      /// <summary>
      /// The name of the property affected by the broken rule.
      /// </summary>
      /// <value>The property affected by the rule.</value>
      public string Property
      {
         get { return _property; }
      }
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -