Microsoft.Protocols.TestSuites.MS_OXORULE.StoreObjectEntryID.Serialize C# (CSharp) Method

Serialize() public method

Get serialized byte array for this struct
public Serialize ( ) : byte[]
return byte[]
        public byte[] Serialize()
        {
            List<byte> bytes = new List<byte>();
            bytes.AddRange(BitConverter.GetBytes(this.Flags));
            bytes.AddRange(this.ProviderUID);
            bytes.Add(this.Version);
            bytes.Add(this.Flag);
            bytes.AddRange(this.DLLFileName);
            bytes.AddRange(BitConverter.GetBytes(this.WrappedFlags));
            bytes.AddRange(this.WrappedProviderUID);
            bytes.AddRange(BitConverter.GetBytes(this.WrappedType));
            bytes.AddRange(Encoding.ASCII.GetBytes(this.ServerShortname + "\0"));
            bytes.AddRange(Encoding.ASCII.GetBytes(this.MailBoxDN + "\0"));
            return bytes.ToArray();
        }

Usage Example

コード例 #1
0
        /// <summary>
        /// Get store object EntryID bytes array.
        /// </summary>
        /// <param name="storeObjectType">Identify the store object is a mailbox or a public folder.</param>
        /// <param name="serverShortName">Server short name string.</param>
        /// <param name="mailboxDN">Mailbox DN string.</param>
        /// <returns>Store object EntryID bytes array.</returns>
        public byte[] GetStoreObjectEntryID(StoreObjectType storeObjectType, string serverShortName, string mailboxDN)
        {
            StoreObjectEntryID objectEntryId = new StoreObjectEntryID(storeObjectType)
            {
                ServerShortname = serverShortName,
                MailBoxDN       = mailboxDN
            };

            return(objectEntryId.Serialize());
        }
All Usage Examples Of Microsoft.Protocols.TestSuites.MS_OXORULE.StoreObjectEntryID::Serialize