Beispiel #1
0
        public static SpTypeManager Import(string proto)
        {
            SpTypeManager instance = new SpTypeManager();

            new SpProtoParser(instance).Parse(proto);
            return(instance);
        }
Beispiel #2
0
        public static SpTypeManager Import(Stream stream)
        {
            SpTypeManager instance = new SpTypeManager();

            new SpProtoParser(instance).Parse(stream);
            return(instance);
        }
Beispiel #3
0
        public static SpRpc Create(SpTypeManager tm, string package)
        {
            if (tm == null)
            {
                return(null);
            }

            SpType t = tm.GetType(package);

            if (t == null)
            {
                return(null);
            }

            SpRpc rpc = new SpRpc(tm, t);

            return(rpc);
        }
Beispiel #4
0
 public void Attach(SpTypeManager tm)
 {
     mAttachTypeManager = tm;
 }
Beispiel #5
0
 public void Attach(string proto)
 {
     Attach(SpTypeManager.Import(proto));
 }
Beispiel #6
0
 public SpRpc(SpTypeManager tm, SpType t)
 {
     mHostTypeManager = tm;
     mHeaderType      = t;
 }
Beispiel #7
0
 public static SpRpc Create(string proto, string package)
 {
     return(Create(SpTypeManager.Import(proto), package));
 }
Beispiel #8
0
 public SpProtoParser(SpTypeManager m)
 {
     mTypeManager = m;
     mTypes       = new List <SpType>();
 }
Beispiel #9
0
 public SpCodec(SpTypeManager m)
 {
     mTypeManager = m;
 }