public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            var binarySerializer = SerializationFactory.GetBinarySerializer();
            var binarySerializationContext = new BinarySerializationContextInfo(info);

            binarySerializer.Serialize(this, binarySerializationContext);
        }
        private void OnDeserialized(StreamingContext context)
        {
            IsDeserializedDataAvailable = true;

            var binarySerializer = SerializationFactory.GetBinarySerializer();
            var binarySerializationContext = new BinarySerializationContextInfo(_serializationInfo);

            binarySerializer.Deserialize(this, binarySerializationContext);

            DeserializationSucceeded = true;
        }
        private void OnDeserialized(StreamingContext context)
        {
            IsDeserializedDataAvailable = true;

            if (_serializationInfo == null)
            {
                // Probably a custom serializer which will populate us in a different way
                return;
            }

            var binarySerializer = SerializationFactory.GetBinarySerializer();
            var binarySerializationContext = new BinarySerializationContextInfo(_serializationInfo);

            binarySerializer.Deserialize(this, binarySerializationContext);

            DeserializationSucceeded = true;
        }