Пример #1
0
 public object ReadObject()
 {
     //flush first in case there is any data in the
     //output buffer
     Flush();
     return(_decoder.ReadObject());
 }
        /// <summary>
        /// Deserializes the given object from bytes
        /// </summary>
        /// <param name="bytes">The bytes to deserialize</param>
        /// <returns>The object</returns>
        /// <seealso cref="Org.IdentityConnectors.Framework.Common.Serializer.ObjectSerializerFactory" />
        public static object DeserializeBinaryObject(byte[] bytes)
        {
            ObjectSerializerFactory  fact = ObjectSerializerFactory.GetInstance();
            MemoryStream             mem  = new MemoryStream(bytes);
            BinaryObjectDeserializer des  = fact.NewBinaryDeserializer(mem);

            return(des.ReadObject());
        }