示例#1
0
 public static object Deserializer(System.Type expected, global::Orleans.Serialization.BinaryTokenStreamReader stream)
 {
     Server.MapEntry result = new Server.MapEntry();
     result.EntranceMapID = ((uint)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(uint), stream)));
     result.EntranceMapX = ((float)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(float), stream)));
     result.EntranceMapY = ((float)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(float), stream)));
     result.Flags = ((uint)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(uint), stream)));
     result.InternalName = ((string)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(string), stream)));
     result.MapID = ((uint)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(uint), stream)));
     object objResult = ((object)(result));
     object temp7 = ((byte[])(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(byte[]), stream)));
     fieldInfo7.SetValue(objResult, temp7);
     object temp8 = ((byte[])(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(byte[]), stream)));
     fieldInfo8.SetValue(objResult, temp8);
     object temp9 = ((Server.MapType)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Server.MapType), stream)));
     fieldInfo9.SetValue(objResult, temp9);
     return objResult;
 }
示例#2
0
 public static object DeepCopier(object original)
 {
     Server.MapEntry input = ((Server.MapEntry)(original));
     Server.MapEntry result = new Server.MapEntry();
     Orleans.Serialization.SerializationContext.Current.RecordObject(original, result);
     result.EntranceMapID = input.EntranceMapID;
     result.EntranceMapX = input.EntranceMapX;
     result.EntranceMapY = input.EntranceMapY;
     result.Flags = input.Flags;
     result.InternalName = input.InternalName;
     result.MapID = input.MapID;
     object objResult = ((object)(result));
     object temp7 = ((byte[])(Orleans.Serialization.SerializationManager.DeepCopyInner(fieldInfo7.GetValue(input))));
     fieldInfo7.SetValue(objResult, temp7);
     object temp8 = ((byte[])(Orleans.Serialization.SerializationManager.DeepCopyInner(fieldInfo8.GetValue(input))));
     fieldInfo8.SetValue(objResult, temp8);
     object temp9 = input.Type;
     fieldInfo9.SetValue(objResult, temp9);
     return objResult;
 }