internal RuleSummaryRecord(string ruleId, string ruleName, TagSet tag, RuleHelpInfo info) { RuleId = ruleId; RuleName = ruleName; Tag = tag?.ToHashtable(); Info = info; }
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; }
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; } }