public static ObjectInstanceScope LoadObjectInstanceScope(BinaryReader reader, CSWCSerizlizer serizlizer, IDictionary <int, object> serizlized, int key) { ObjectInstanceScope scope = new ObjectInstanceScope(null); serizlized.Add(key, scope); rtti.Class _class = serizlizer.DeserializeObject <rtti.Class>(reader, rtti.Class.LoadClass); scope._class = _class; scope.LoadScopeBase(reader, serizlizer); return(scope); }
public static ScopeBase Deserialize(BinaryReader reader, CSWCSerizlizer serizlizer, IDictionary <int, object> serizlized, int key) { string type = reader.ReadString(); if (type == "FunctionScope") { return(FunctionScope.LoadFunctionScope(reader, serizlizer, serizlized, key)); } else if (type == "ObjectInstanceScope") { return(ObjectInstanceScope.LoadObjectInstanceScope(reader, serizlizer, serizlized, key)); } else if (type == "OutPackageMemberScope") { return(OutPackageMemberScope.LoadOutPackageMemberScope(reader, serizlizer, serizlized, key)); } else { throw new IOException("异常的Scope类型"); } }