Esempio n. 1
0
        public void SerializeObject(object target, IDataAdapter data, ISubSerializer subSerializer)
        {
            CustomSerializationClass obj = (CustomSerializationClass)target;

            data.AddStringValue(obj.A, "someData", true);
            data.AddStringValue(obj.B.ToString(), "someOtherData", true);
        }
Esempio n. 2
0
        public object DeserializeObject(IDataAdapter data, ISubDeserializer subDeserializer)
        {
            string a = data.GetStringValue("someData", true);
            CustomSerializationClass obj = new CustomSerializationClass(a);

            obj.B = (NanoState)Enum.Parse(typeof(NanoState), data.GetStringValue("someOtherData", true));
            return(obj);
        }