Exemple #1
0
 public Setting <TResult> Setting <TResult>(Func <TResult> setValue, Optional <Evaluate> evaluate = default(Optional <Evaluate>), Optional <SetupRole> roles = default(Optional <SetupRole>), Optional <SetupMode> modes = default(Optional <SetupMode>))
 {
     return(base.Setting <TResult>(setValue, evaluate.DefaultTo(Evaluate.OnDemand), new Feature[]
     {
         new RoleFeature(roles.DefaultTo(SetupRole.All)),
         new ModeFeature(modes.DefaultTo(SetupMode.All))
     }));
 }
Exemple #2
0
 public Setting <TResult> Setting <TResult, TParent>(Func <AnalysisMember <TParent> > forEachResult, Func <Result <TParent>, IEnumerable <Result <TResult> > > setResults, Optional <Evaluate> evaluate = default(Optional <Evaluate>), Optional <SetupRole> roles = default(Optional <SetupRole>), Optional <SetupMode> modes = default(Optional <SetupMode>))
 {
     return(base.Setting <TResult, TParent>(forEachResult, setResults, evaluate.DefaultTo(Evaluate.OnDemand), new Feature[]
     {
         new RoleFeature(roles.DefaultTo(SetupRole.All)),
         new ModeFeature(modes.DefaultTo(SetupMode.All))
     }));
 }
Exemple #3
0
 public Rule Rule <TParent>(Func <AnalysisMember <TParent> > forEachResult, Func <RuleResult, string> message, Func <Result <TParent>, bool> condition, Optional <Evaluate> evaluate = default(Optional <Evaluate>), Optional <SetupRole> roles = default(Optional <SetupRole>), Optional <SetupMode> modes = default(Optional <SetupMode>), Optional <Severity> severity = default(Optional <Severity>))
 {
     return(base.Rule <TParent>(forEachResult, condition, evaluate.DefaultTo(Evaluate.OnDemand), severity.DefaultTo(Severity.Error), new Feature[]
     {
         new RoleFeature(roles.DefaultTo(SetupRole.All)),
         new ModeFeature(modes.DefaultTo(SetupMode.All)),
         new MessageFeature((Result x) => message((RuleResult)x))
     }));
 }