示例#1
0
        //---------------------------------------------------------------------
        public void setRpcSessionFactory(RpcSessionFactory factory)
        {
            mRpcSessionFactory = factory;

            mDefaultRpcSession        = mRpcSessionFactory.createRpcSession();
            mMapRpcSession["Default"] = mDefaultRpcSession;
        }
示例#2
0
        //---------------------------------------------------------------------
        public RpcSession createRpcSession(string name, bool as_default = false)
        {
            if (mMapRpcSession.ContainsKey(name))
            {
                EbLog.Error("EntityMgr.createRpcSession() Failed! Exist Name=" + name);
                return(null);
            }

            var rpc_session = mRpcSessionFactory.createRpcSession();

            if (as_default)
            {
                mDefaultRpcSession = rpc_session;
            }
            mMapRpcSession[name] = rpc_session;
            return(rpc_session);
        }