示例#1
0
 public ForcedMethodsSpec(string ruleId, string title, string message, string sourceClass, string forcedMethod, int requiredArgumentCount)
 {
     this.SourceClass           = sourceClass;
     this.ForcedMethod          = forcedMethod;
     this.Rule                  = RuleHelpers.CreateRule(code: ruleId, category: Categories.ForcedMethodInvocations, title: title, message: message);
     this.RequiredArgumentCount = requiredArgumentCount;
 }
示例#2
0
        public NameSanitationSpec(string ruleId, string title, string message, string sourceClass, string[] whitelistedParameterNames)
        {
            this.SourceClass = sourceClass;
            this.WhitelistedParameterNames = whitelistedParameterNames;

            this.Rule = RuleHelpers.CreateRule(code: ruleId, category: Categories.Naming, title: title, message: message);
        }
示例#3
0
        public TypeCheckSpec(string ruleId, string title, string message, string allowedSourceClass, string prohibitedClass, bool isProtected, bool matchTypeOnGenericParameters)
        {
            this.AllowedSourceClass           = allowedSourceClass;
            this.ProhibitedClass              = prohibitedClass;
            this.IsProtected                  = isProtected;
            this.MatchTypeOnGenericParameters = matchTypeOnGenericParameters;

            this.Rule = RuleHelpers.CreateRule(code: ruleId, category: Categories.Naming, title: title, message: message);
        }
 public ConfiguredClass(string ruleId, string title, string message, string className, SyntaxKind visibility)
 {
     this.ClassName  = className;
     this.Visibility = visibility;
     this.Rule       = RuleHelpers.CreateRule(code: ruleId, category: Categories.Classes, title: title, message: message);
 }
 public ProhibitedClassSpec(string ruleId, string title, string message, string sourceClass)
 {
     this.SourceClass = sourceClass;
     this.Rule        = RuleHelpers.CreateRule(code: ruleId, category: Categories.IllegalClassUsage, title: title, message: message);
 }
 public ProhibitedMethodsSpec(string ruleId, string title, string message, string sourceClass, string bannedMethod)
 {
     this.SourceClass  = sourceClass;
     this.BannedMethod = bannedMethod;
     this.Rule         = RuleHelpers.CreateRule(code: ruleId, category: Categories.IllegalMethodCalls, title: title, message: message);
 }