private void OnSerializing(StreamingContext context) { if (null != this.securityIdentifier) { this.binarySecurityIdentifier = ValueConvertor.ConvertValueToBinary(this.securityIdentifier, null); } }
private static byte[] CalculateEffectiveId(IGenericADUser adUser) { byte[] result = null; SecurityIdentifier securityIdentifier = IdentityHelper.CalculateEffectiveSid(adUser.Sid, adUser.MasterAccountSid); if (securityIdentifier != null) { result = ValueConvertor.ConvertValueToBinary(securityIdentifier, null); } return(result); }
public bool TryCalculateOnSave(ICorePropertyBag itemPropertyBag, ConversationIndex.FixupStage stage, ConversationIndex conversationIndex, CoreItemOperation operation, out byte[] conversationCreatorSid) { conversationCreatorSid = null; if (operation != CoreItemOperation.Save) { return(false); } byte[] itemOwnerSid = ValueConvertor.ConvertValueToBinary(this.mailboxSession.MailboxOwner.Sid, null); ConversationCreatorSidCalculator.MessageType messageType = this.CalculateMessageTypeOnSave(stage); return(this.TryCalculateConversationCreatorSid(conversationIndex, messageType, itemOwnerSid, out conversationCreatorSid)); }
public static bool TryCalculateConversationCreatorSidOnSaving(MailboxSession mailboxSession, ICorePropertyBag itemPropertyBag, ConversationIndex.FixupStage fixupStage, ConversationIndex conversationIndex, out byte[] conversationCreatorSid) { conversationCreatorSid = null; if (!ConversationCreatorHelper.SupportsConversationCreator(mailboxSession) || itemPropertyBag.GetValueOrDefault <bool>(InternalSchema.DeleteAfterSubmit, false)) { return(false); } conversationCreatorSid = ConversationCreatorHelper.CalculateConversationCreatorSid(mailboxSession, itemPropertyBag, fixupStage, conversationIndex, ValueConvertor.ConvertValueToBinary(mailboxSession.MailboxOwner.Sid, null)); return(conversationCreatorSid != null); }