public void Deserialize(BinaryReader reader) { Type = (Types)reader.ReadByte(); switch (Type) { case Types.Null: break; case Types.LocalCoreUUID: case Types.UUIDRef: GUID = new BaseGGUUID().FromData(reader); break; case Types.ExternalCoreUUID: case Types.StreamingRef: GUID = new BaseGGUUID().FromData(reader); // This could be a Filename instance - no way to determine the type ExternalFile = new BaseString(); ExternalFile.Deserialize(reader); break; default: throw new NotImplementedException(); } }
public override void DeserializeStateObject(SaveState state) { Type = Types.StreamingRef; ExternalFile = new BaseString(state.ReadIndexedString()); GUID = state.ReadIndexedGUID(); // if not zero, calls something into the streaming manager byte unknown = state.Reader.ReadByte(); }
public BaseRef(Type objectType) { Type = Types.Null; GUID = BaseGGUUID.Empty; ExternalFile = ""; }