Beispiel #1
0
        public override RoleInfoResponse Play()
        {
            //MessageSender.PushMessage(Context.Token.Rid,new{A="111",B="222"});

            base.ServerReslover.Resolve <IDatabase>().StringSet("a", DateTime.Now.Ticks);

            return(new RoleInfoResponse()
            {
                Name = "mrglee",
                Lv = 2,
                CreateAt = DateTime.UtcNow.FromDateTime(),
                A = new DateTime(Convert.ToInt64(ServerReslover.Resolve <IDatabase>().StringGet("a")))
            });
        }
Beispiel #2
0
        /// <summary>
        /// 获取公共服连接
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        protected IDbConnection GetPublicDbConnection(string name)
        {
            var dbconnection = ServerReslover.ResolveNamed <IDbConnection>(name);

            return(dbconnection);
        }