// Token: 0x0600150C RID: 5388 RVA: 0x0004AD7C File Offset: 0x00048F7C private static string[] GetAttachmentTypeIds(List <string> locationList, PolicyTipRequestLogger policyTipRequestLogger) { if (locationList == null) { return(null); } List <string> list = new List <string>(); foreach (string text in locationList) { if (!string.IsNullOrEmpty(text) && !text.Equals("Message Body", StringComparison.OrdinalIgnoreCase)) { int num = text.LastIndexOf(':'); if (num <= 0 || num == text.Length - 1) { policyTipRequestLogger.AppendData("InvalidAttachment", text); } else { string value = text.Substring(0, num); string text2 = text.Substring(num + 1); if (string.IsNullOrEmpty(value) || string.IsNullOrEmpty(text2)) { policyTipRequestLogger.AppendData("InvalidAttachment", text); } else { list.Add(text2); } } } } return(list.ToArray()); }
internal static List <string> MarkAsPII(List <string> data) { if (data == null) { return(data); } for (int i = 0; i < data.Count; i++) { data[i] = PolicyTipRequestLogger.MarkAsPII(data[i]); } return(data); }
public override string ToString() { string format = "Action:{0}/AttachmentIds:{1}/Recipients:{2}/Classifications:{3}."; object[] array = new object[4]; array[0] = this.Action.ToString(); object[] array2 = array; int num = 1; string text; if (this.AttachmentIds != null) { text = string.Join(";", from attachId in this.AttachmentIds select attachId.Id); } else { text = string.Empty; } array2[num] = text; object[] array3 = array; int num2 = 2; string text2; if (this.Recipients != null) { text2 = string.Join(";", from emailAddressWrapper in this.Recipients select PolicyTipRequestLogger.MarkAsPII(emailAddressWrapper.EmailAddress)); } else { text2 = string.Empty; } array3[num2] = text2; array[3] = ((this.Classifications == null) ? string.Empty : string.Join(";", this.Classifications)); return(string.Format(format, array)); }
// Token: 0x0600150F RID: 5391 RVA: 0x0004AF68 File Offset: 0x00049168 internal static string PredicateEvalResultToString(PredicateEvaluationResult predicateEvalResult) { if (predicateEvalResult == null) { return(string.Empty); } List <string> values = (predicateEvalResult.Type == typeof(SentToPredicate) || predicateEvalResult.Type == typeof(SentToScopePredicate) || predicateEvalResult.Type == typeof(OwaIsSameUserPredicate)) ? PolicyTipRequestLogger.MarkAsPII(predicateEvalResult.MatchResults) : predicateEvalResult.MatchResults; return(string.Format("IsPredicateMatch:{0}/MatchResults:{1}/SupplInfo:{2}/Type:{3}/PropertyName:{4}.", new object[] { predicateEvalResult.IsMatch ? "1" : "0", string.Join(";", values), predicateEvalResult.SupplementalInfo, predicateEvalResult.Type, predicateEvalResult.PropertyName ?? string.Empty })); }
// Token: 0x060014F3 RID: 5363 RVA: 0x0004A560 File Offset: 0x00048760 public OwaRulesEvaluationContext(RuleCollection rules, ScanResultStorageProvider scanResultStorageProvider, Item item, string fromAddress, ShortList <string> recipients, PolicyTipRequestLogger policyTipRequestLogger) : base(rules, new OwaRulesTracer()) { if (rules == null) { throw new ArgumentNullException("rules"); } if (scanResultStorageProvider == null) { throw new ArgumentNullException("scanResultStorageProvider"); } if (item == null) { throw new ArgumentNullException("item"); } if (fromAddress == null) { throw new ArgumentNullException("fromAddress"); } if (policyTipRequestLogger == null) { throw new ArgumentNullException("policyTipRequestLogger"); } this.Item = item; this.ScanResultStorageProvider = scanResultStorageProvider; this.FromAddress = fromAddress; this.Recipients = recipients; this.userComparer = Microsoft.Exchange.Clients.Owa2.Server.Core.UserComparer.CreateInstance(); this.membershipChecker = new MembershipChecker(this.OrganizationId); base.SetConditionEvaluationMode(ConditionEvaluationMode.Full); this.policyTipRequestLogger = policyTipRequestLogger; this.RuleExecutionMonitor = new RuleHealthMonitor(RuleHealthMonitor.ActivityType.Execute, 1L, 0L, delegate(string eventMessageDetails) { }); this.RuleExecutionMonitor.MtlLogWriter = new RuleHealthMonitor.MtlLogWriterDelegate(this.AppendPerRuleDiagnosticData); this.RuleExecutionMonitor.TenantId = this.OrganizationId.ToString(); }
// Token: 0x0600150B RID: 5387 RVA: 0x0004ACA8 File Offset: 0x00048EA8 internal static void TrackMatchingRecipientsAndAttachments(RuleEvaluationResult ruleEvaluationResult, PolicyTipRequestLogger policyTipRequestLogger, out EmailAddressWrapper[] recipientEmails, out string[] attachmentIds) { recipientEmails = null; attachmentIds = null; if (ruleEvaluationResult == null) { return; } if (ruleEvaluationResult.Predicates != null) { List <string> listA = null; PredicateEvaluationResult predicateEvaluationResult = RuleEvaluationResult.GetPredicateEvaluationResult(typeof(SentToPredicate), ruleEvaluationResult.Predicates).FirstOrDefault <PredicateEvaluationResult>(); if (predicateEvaluationResult != null) { listA = predicateEvaluationResult.MatchResults; } List <string> listB = null; PredicateEvaluationResult predicateEvaluationResult2 = RuleEvaluationResult.GetPredicateEvaluationResult(typeof(SentToScopePredicate), ruleEvaluationResult.Predicates).FirstOrDefault <PredicateEvaluationResult>(); if (predicateEvaluationResult2 != null) { listB = predicateEvaluationResult2.MatchResults; } List <string> locationList = null; PredicateEvaluationResult predicateEvaluationResult3 = (from mcdc in RuleEvaluationResult.GetPredicateEvaluationResult(typeof(ContainsDataClassificationPredicate), ruleEvaluationResult.Predicates) where mcdc.SupplementalInfo == 1 select mcdc).FirstOrDefault <PredicateEvaluationResult>(); if (predicateEvaluationResult3 != null) { locationList = predicateEvaluationResult3.MatchResults; } recipientEmails = OwaRulesEvaluationContext.IntersectAndReturnEmailAddressWrappers(listA, listB); attachmentIds = OwaRulesEvaluationContext.GetAttachmentTypeIds(locationList, policyTipRequestLogger); } }
// Token: 0x0600150A RID: 5386 RVA: 0x0004ABF4 File Offset: 0x00048DF4 private static AttachmentIdType[] ConvertAttachmentIdsToAttachmentIdTypes(string[] attachmentIds, Item item, PolicyTipRequestLogger policyTipRequestLogger) { if (attachmentIds == null || attachmentIds.Length == 0) { return(null); } List <AttachmentIdType> list = new List <AttachmentIdType>(); foreach (string text in attachmentIds) { AttachmentId item2 = null; try { item2 = AttachmentId.Deserialize(text); } catch (CorruptDataException) { policyTipRequestLogger.AppendData("InvalidAttachment", text); } AttachmentIdType item3 = new AttachmentIdType(new IdAndSession(item.Id, item.Session, new List <AttachmentId> { item2 }).GetConcatenatedId().Id); list.Add(item3); } return(list.ToArray()); }