コード例 #1
0
 public WxqFuncController(OryxWebSocketPool _wsPool,
                          VoteAppDbContext _dbContext,
                          RabbitMQClient _rabbitMqClient
                          )
 {
     wsPool         = _wsPool;
     dbContext      = _dbContext;
     rabbitMqClient = _rabbitMqClient;
 }
コード例 #2
0
        public static IApplicationBuilder UserSocialRabbitMQ(this IApplicationBuilder app)
        {
            var rmqClient = app.ApplicationServices.GetService <RabbitMQClient>();

            wsPool = app.ApplicationServices.GetService <OryxWebSocketPool>();
            rmqClient.RegisterReciverQueue(SocialMsgManager.SocialMsgWSRabbitMQKey, SocialMsgManager.SocialMsgWSRabbitMQExchange);
            rmqClient.RegisterQueueConsumer(SocialMsgManager.SocialMsgWSRabbitMQKey);
            rmqClient[SocialMsgManager.SocialMsgWSRabbitMQKey].Consumer.Received += Consumer_Received;
            return(app);
        }
コード例 #3
0
 public SocialMsgManager(
     IDistributedCache _distributedCache,
     OryxWebSocketPool _wsPool,
     RabbitMQClient _rabbitMQClient
     )
 {
     distributedCache = _distributedCache;
     wsPool           = _wsPool;
     rabbitMQClient   = _rabbitMQClient;
 }
コード例 #4
0
 public GameController(QiniuTool _qiniutool,
                       VoteAppDbContext _dbContext,
                       IMemoryCache _memoryCache,
                       OryxWebSocketPool _wsPool,
                       IDistributedCache _distributedCache,
                       RabbitMQClient _rabbitMqClient
                       )
 {
     qiniutool        = _qiniutool;
     dbContext        = _dbContext;
     memoryCache      = _memoryCache;
     wsPool           = _wsPool;
     distributedCache = _distributedCache;
     rabbitMqClient   = _rabbitMqClient;
 }
コード例 #5
0
        public static IApplicationBuilder UseRabbitMQClient(this IApplicationBuilder app)
        {
            var rabbitMQClient = (RabbitMQClient)app.ApplicationServices.GetService(typeof(RabbitMQClient));

            wsPool = (OryxWebSocketPool)app.ApplicationServices.GetService(typeof(OryxWebSocketPool));
            rabbitMQClient.RegisterReciverQueue("Broadcast", "FanoutExchange");
            rabbitMQClient.RegisterQueueConsumer("Broadcast");
            rabbitMQClient.RegisterReciverQueue("BroadcastUserInfo", "FanoutUserInfoExchange");
            rabbitMQClient.RegisterQueueConsumer("BroadcastUserInfo");
            rabbitMQClient.RegisterReciverQueue("BroadcastWxq", "FanoutWxqExchange");
            rabbitMQClient.RegisterQueueConsumer("BroadcastWxq");
            rabbitMQClient.RegisterReciverQueue("BroadcastWxqPic", "FanoutWxqPicExchange");
            rabbitMQClient.RegisterQueueConsumer("BroadcastWxqPic");
            rabbitMQClient["Broadcast"].Consumer.Received         += Consumer_Received;
            rabbitMQClient["BroadcastUserInfo"].Consumer.Received += BroadcastUserInfoConsumer_Received;
            rabbitMQClient["BroadcastWxq"].Consumer.Received      += BroadcastWxqConsumer_Received;;
            rabbitMQClient["BroadcastWxqPic"].Consumer.Received   += BroadcastWxqPicPicConsumer_Received;
            return(app);
        }
コード例 #6
0
 //private IMemoryCache _cache;
 public VoteController(
     VoteAppDbContext _dbContext,
     OryxWebSocketPool _wsPool,
     GlobalVoteResultDic _globalVoteResultDic,
     DbOperationMngr _dbOptMng,
     IDistributedCache memoryCache,
     ILogger <VoteController> logger,
     SingletonAppDbContext _singletonDbContext,
     RabbitMQClient _rabbitMqClient
     )
 {
     dbOptMng            = _dbOptMng;
     dbContext           = _dbContext;
     wsPool              = _wsPool;
     globalVoteResultDic = _globalVoteResultDic;
     _cache              = memoryCache;
     _logger             = logger;
     singletonDbContext  = _singletonDbContext;
     rabbitMqClient      = _rabbitMqClient;
 }
コード例 #7
0
 public OryxWebSocketHandler(OryxWebSocketPool _oryxWebSocketPool)
 {
     oryxWebSocketPool = _oryxWebSocketPool;
 }
コード例 #8
0
 public ChatController(OryxWebSocketPool _oryxWebSocketPool)
 {
     oryxWebSocketPool = _oryxWebSocketPool;
 }