public void Serialize(Stream serializationStream, object value)
        {
            if (SerializationInfoContainer.IsState(value.GetType()))
            {
                value = new SysState()
                {
                    TypeName = value.GetType().AssemblyQualifiedName,
                    Value    = value
                };
            }
            else if (!(value is IMobileObject))
            {
                new BinaryFormatterWrapper().Serialize(serializationStream, value);
                return;
            }

            new MobileFormatter().Serialize(serializationStream, value);
        }
 public bool IsState(Type stateType)
 {
     return(SerializationInfoContainer.IsState(stateType));
 }