Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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类型");
            }
        }