Esempio n. 1
0
 public static void Serialize(SubData x, BinaryWriter w)
 {
     if (x == null)
     {
         w.Write(false);
         return;
     }
     w.Write(true);
     w.Write(x.SomeInt1);
     w.Write(x.SomeInt2);
 }
Esempio n. 2
0
        public static SubData Deserialize(BinaryReader r)
        {
            {
                bool isNotNull = r.ReadBoolean();
                if (!isNotNull)
                {
                    return(null);
                }
            }
            var ret = new SubData();

            ret.SomeInt1 = r.ReadInt32();
            ret.SomeInt2 = r.ReadInt32();
            return(ret);
        }
		public static SubData Deserialize(BinaryReader r)
		{
			{
				bool isNotNull = r.ReadBoolean();
				if(!isNotNull)
					return null;
			}
			var ret = new SubData();
			ret.SomeInt1 = r.ReadInt32();
			ret.SomeInt2 = r.ReadInt32();
			return ret;
		}
		public static void Serialize(SubData x, BinaryWriter w)
		{
			if(x == null)
			{
				w.Write(false);
				return;
			}
			w.Write(true);
			w.Write(x.SomeInt1);
			w.Write(x.SomeInt2);
		}