Esempio n. 1
0
        public static OutPackageMemberScope LoadOutPackageMemberScope(BinaryReader reader, CSWCSerizlizer serizlizer, IDictionary <int, object> serizlized, int key)
        {
            OutPackageMemberScope scope = new OutPackageMemberScope(null); serizlized.Add(key, scope);

            rtti.Class mainclass = serizlizer.DeserializeObject <rtti.Class>(reader, rtti.Class.LoadClass);
            scope.mainclass = mainclass;
            scope.LoadScopeBase(reader, serizlizer);
            return(scope);
        }
Esempio 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类型");
            }
        }