Deserialize() 공개 메소드

Deserialize from a stream.
public Deserialize ( Stream stream, int size ) : int
stream Stream A stream contains serialize.
size int Must be -1.
리턴 int
예제 #1
0
        /// <summary>
        /// Gets the REPLGUID_IDSET.
        /// </summary>
        /// <param name="id">The id to be calculated.</param>
        /// <param name="type">The type to be calculated.</param>
        /// <returns>A REPLGUID_IDSET.</returns>
        public REPLGUID_IDSET GetIdset(ushort id, ushort type)
        {
            if (this.PropList != null)
            {
                byte[] buffer = this.PropList.GetPropValue(id, type) as byte[];
                if (buffer != null && buffer.Length > 0)
                {
                    using (MemoryStream ms = new MemoryStream(buffer, false))
                    {
                        REPLGUID_IDSET idset = null;
                        idset = new REPLGUID_IDSET();
                        idset.Deserialize(ms, -1);
                        return(idset);
                    }
                }
            }

            return(null);
        }
예제 #2
0
        /// <summary>
        /// Gets the REPLGUID_IDSET.
        /// </summary>
        /// <param name="id">The id to be calculated.</param>
        /// <param name="type">The type to be calculated.</param>
        /// <returns>A REPLGUID_IDSET.</returns>
        public REPLGUID_IDSET GetIdset(ushort id, ushort type)
        {
            if (this.PropList != null)
            {
                byte[] buffer = this.PropList.GetPropValue(id, type) as byte[];
                if (buffer != null && buffer.Length > 0)
                {
                    using (MemoryStream ms = new MemoryStream(buffer, false))
                    {
                        REPLGUID_IDSET idset = null;
                        idset = new REPLGUID_IDSET();
                        idset.Deserialize(ms, -1);
                        return idset;
                    }
                }
            }

            return null;
        }