Microsoft.Protocols.TestSuites.MS_OXORULE.MS_OXORULEAdapter.GetFolderEntryId C# (CSharp) Method

GetFolderEntryId() public method

Get folder EntryID bytes array.
public GetFolderEntryId ( StoreObjectType storeObjectType, uint objHandle, ulong folderid ) : byte[]
storeObjectType StoreObjectType Identify the store object is a mailbox or a public folder.
objHandle uint Logon handle.
folderid ulong Folder id value.
return byte[]
        public byte[] GetFolderEntryId(StoreObjectType storeObjectType, uint objHandle, ulong folderid)
        {
            // Get folder longterm id.
            RopLongTermIdFromIdResponse longTermIdFromId = this.GetLongTermId(objHandle, folderid);
            FolderEntryID folderEntryId;
            if (storeObjectType == StoreObjectType.Mailbox)
            {
                folderEntryId = new FolderEntryID(storeObjectType, this.mailboxGUID, longTermIdFromId.LongTermId.DatabaseGuid, longTermIdFromId.LongTermId.GlobalCounter);
            }
            else
            {
                byte[] providerUID = new byte[] { 0x1A, 0x44, 0x73, 0x90, 0xAA, 0x66, 0x11, 0xCD, 0x9B, 0xC8, 0x00, 0xAA, 0x00, 0x2F, 0xC4, 0x5A };
                folderEntryId = new FolderEntryID(storeObjectType, providerUID, longTermIdFromId.LongTermId.DatabaseGuid, longTermIdFromId.LongTermId.GlobalCounter);
            }

            this.VerifyFolderEntryID(folderEntryId, storeObjectType);
            return folderEntryId.Serialize();
        }