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

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

            new SpProtoParser(instance).Parse(stream);
            return(instance);
        }
Example #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);
        }
Example #4
0
 public void Attach(SpTypeManager tm)
 {
     mAttachTypeManager = tm;
 }
Example #5
0
 public void Attach(string proto)
 {
     Attach(SpTypeManager.Import(proto));
 }
Example #6
0
 public SpRpc(SpTypeManager tm, SpType t)
 {
     mHostTypeManager = tm;
     mHeaderType      = t;
 }
Example #7
0
 public static SpRpc Create(string proto, string package)
 {
     return(Create(SpTypeManager.Import(proto), package));
 }
Example #8
0
 public SpProtoParser(SpTypeManager m)
 {
     mTypeManager = m;
     mTypes       = new List <SpType>();
 }
Example #9
0
 public SpCodec(SpTypeManager m)
 {
     mTypeManager = m;
 }