private static void ResetHasDlpDetectedClassifications(Attachment attachment) { if (attachment != null && !ScanResultStorageProvider.IsExcludedFromDlp(attachment)) { attachment.Delete(AttachmentSchema.HasDlpDetectedClassifications); attachment.Save(); } }
public override void SetHasDlpDetectedClassifications() { base.StoreItem[ItemSchema.HasDlpDetectedClassifications] = string.Empty; AttachmentCollection attachmentCollection = base.StoreItem.AttachmentCollection; if (attachmentCollection != null) { foreach (AttachmentHandle handle in attachmentCollection) { using (Attachment attachment = base.StoreItem.AttachmentCollection.Open(handle)) { if (attachment != null && !ScanResultStorageProvider.IsExcludedFromDlp(attachment)) { attachment[AttachmentSchema.HasDlpDetectedClassifications] = string.Empty; attachment.Save(); } } } } }
// Token: 0x06001564 RID: 5476 RVA: 0x0004C0E8 File Offset: 0x0004A2E8 public override void SetHasDlpDetectedClassifications() { this.ResetClassifiedParts(); this.clientScanResultStorage.ClassifiedParts.Add(ScanResultStorageProvider.MessageBodyName); AttachmentCollection attachmentCollection = base.StoreItem.AttachmentCollection; if (attachmentCollection != null) { foreach (AttachmentHandle handle in attachmentCollection) { using (Attachment attachment = base.StoreItem.AttachmentCollection.Open(handle)) { if (attachment != null && !ScanResultStorageProvider.IsExcludedFromDlp(attachment)) { this.clientScanResultStorage.ClassifiedParts.Add(string.Format(ScanResultStorageProvider.UniqueIdFormat, attachment.FileName, attachment.Id.ToBase64String())); } } } } }
public virtual void RefreshAttachmentClassifications() { List <string> list = new List <string>(); AttachmentCollection attachmentCollection = this.StoreItem.AttachmentCollection; if (attachmentCollection != null && attachmentCollection.Count > 0) { foreach (AttachmentHandle handle in attachmentCollection) { using (Attachment attachment = this.StoreItem.AttachmentCollection.Open(handle)) { if (!ScanResultStorageProvider.IsExcludedFromDlp(attachment)) { list.Add(string.Format(ScanResultStorageProvider.UniqueIdFormat, attachment.FileName, attachment.Id.ToBase64String())); } } } } list.Add(ScanResultStorageProvider.MessageBodyName); IEnumerable <DiscoveredDataClassification> dlpDetectedClassificationObjects = FipsResultParser.DeleteClassifications(this.GetDlpDetectedClassificationObjects(), list, true); this.SetDlpDetectedClassificationObjects(dlpDetectedClassificationObjects); }
public virtual bool NeedsClassificationForBodyOrAnyAttachments() { if (this.NeedsClassificationScan()) { return(true); } AttachmentCollection attachmentCollection = this.StoreItem.AttachmentCollection; if (attachmentCollection != null && attachmentCollection.Count > 0) { foreach (AttachmentHandle handle in attachmentCollection) { using (Attachment attachment = this.StoreItem.AttachmentCollection.Open(handle)) { if (attachment != null && !ScanResultStorageProvider.IsExcludedFromDlp(attachment) && this.NeedsClassificationScan(attachment)) { return(true); } } } return(false); } return(false); }