public PsContentContainsSensitiveInformationPredicate(IEnumerable <Hashtable> dataClassifications) { IClassificationRuleStore instance = InMemoryClassificationRuleStore.GetInstance(); try { this.EnginePredicate = new ContentContainsSensitiveInformationPredicate(dataClassifications.Select(new Func <Hashtable, List <KeyValuePair <string, string> > >(PsContentContainsSensitiveInformationPredicate.HashtableToLowerCasedDictionary)).ToList <List <KeyValuePair <string, string> > >(), instance); } catch (CompliancePolicyValidationException innerException) { throw new InvalidContentContainsSensitiveInformationException(Strings.InvalidSensitiveInformationParameterValue, innerException); } }
protected override void InternalProcessRecord() { base.InternalProcessRecord(); IClassificationRuleStore instance = InMemoryClassificationRuleStore.GetInstance(); string locale = CultureInfo.CurrentCulture.ToString().ToLower(); if (this.Identity != null) { RuleDefinitionDetails ruleDefinitionDetails = GetDlpSensitiveInformationType.GetRuleDefinitionDetails(instance, this.Identity, locale); base.WriteObject(new PsDlpSensitiveInformationType(ruleDefinitionDetails)); return; } RULE_PACKAGE_DETAILS[] rulePackageDetails = instance.GetRulePackageDetails(null); foreach (RULE_PACKAGE_DETAILS rule_PACKAGE_DETAILS in rulePackageDetails) { foreach (string identity in rule_PACKAGE_DETAILS.RuleIDs) { RuleDefinitionDetails ruleDefinitionDetails2 = GetDlpSensitiveInformationType.GetRuleDefinitionDetails(instance, identity, locale); base.WriteObject(new PsDlpSensitiveInformationType(ruleDefinitionDetails2)); } } }