Exemplo n.º 1
0
 internal RuleRunner(string leftName, string[] rightNames, bool strictMode, IEqualityComparer <ISymbol> symbolComparer, bool includeInternalSymbols, bool withReferences)
 {
     _context    = new RuleRunnerContext();
     _settings   = new RuleSettings(strictMode, symbolComparer, includeInternalSymbols, withReferences);
     _leftName   = leftName;
     _rightNames = rightNames;
     InitializeRules();
 }
Exemplo n.º 2
0
 public override void Initialize(RuleRunnerContext context)
 {
     // StrictMode scenario should be handled by MembersMustExist rule.
     if (!Settings.StrictMode)
     {
         context.RegisterOnMemberSymbolAction(RunOnMemberSymbol);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Method that is called when the rules are created by the <see cref="IRuleRunner"/> in
 /// order to do the initial setup for the rule.
 /// </summary>
 /// <param name="context">The context that the <see cref="IRuleRunner"/> creates holding callbacks to get the differences.</param>
 public override void Initialize(RuleRunnerContext context)
 {
     // This rule should only run when not in strict mode.
     // When running in strict mode this diff will be handled by MembersMustExist rule.
     if (!Settings.StrictMode)
     {
         context.RegisterOnMemberSymbolAction(RunOnMemberMapperAction);
     }
 }
Exemplo n.º 4
0
 public override void Initialize(RuleRunnerContext context) => context.RegisterOnTypeSymbolAction(RunOnTypeSymbol);
Exemplo n.º 5
0
 public override void Initialize(RuleRunnerContext context)
 {
     context.RegisterOnAssemblySymbolAction(RunOnAssemblySymbol);
 }
Exemplo n.º 6
0
 internal RuleRunner(bool strictMode)
 {
     _context  = new RuleRunnerContext();
     _settings = new RuleSettings(strictMode);
     InitializeRules();
 }