Ejemplo n.º 1
0
 internal RuleSummaryRecord(string ruleId, string ruleName, TagSet tag, RuleHelpInfo info)
 {
     RuleId   = ruleId;
     RuleName = ruleName;
     Tag      = tag?.ToHashtable();
     Info     = info;
 }
Ejemplo n.º 2
0
        internal RuleBlock(SourceFile source, string ruleName, RuleHelpInfo info, PowerShell condition, TagSet tag, string[] dependsOn, Hashtable configuration)
        {
            Source   = source;
            RuleName = ruleName;

            var scriptFileName = Path.GetFileName(Source.Path);

            // Get fully qualified Id, either RuleName or Module\RuleName
            RuleId = RuleHelper.ExpandRuleName(ruleName: ruleName, scriptFileName: scriptFileName, moduleName: Source.ModuleName);

            Info          = info;
            Condition     = condition;
            Tag           = tag;
            DependsOn     = dependsOn;
            Configuration = configuration;
        }
Ejemplo n.º 3
0
 internal RuleRecord(string ruleId, string ruleName, PSObject targetObject, string targetName, string targetType, TagSet tag, RuleHelpInfo info, Hashtable field, RuleOutcome outcome = RuleOutcome.None, RuleOutcomeReason reason = RuleOutcomeReason.None)
 {
     RuleId        = ruleId;
     RuleName      = ruleName;
     TargetObject  = targetObject;
     TargetName    = targetName;
     TargetType    = targetType;
     Outcome       = outcome;
     OutcomeReason = reason;
     Info          = info;
     if (tag != null)
     {
         Tag = tag.ToHashtable();
     }
     if (field != null && field.Count > 0)
     {
         Field = field;
     }
 }