public static OwaStoreObjectId CreateFromSessionFolderId(OwaStoreObjectIdType owaStoreObjectIdType, string legacyDN, StoreObjectId folderId) { if (folderId == null) { throw new ArgumentNullException("folderId"); } switch (owaStoreObjectIdType) { case OwaStoreObjectIdType.MailBoxObject: return(OwaStoreObjectId.CreateFromMailboxFolderId(folderId)); case OwaStoreObjectIdType.PublicStoreFolder: return(OwaStoreObjectId.CreateFromPublicFolderId(folderId)); case OwaStoreObjectIdType.OtherUserMailboxObject: return(OwaStoreObjectId.CreateFromOtherUserMailboxFolderId(folderId, legacyDN)); case OwaStoreObjectIdType.ArchiveMailboxObject: return(OwaStoreObjectId.CreateFromArchiveMailboxFolderId(folderId, legacyDN)); } throw new ArgumentException("mailbox session type is unknown"); }