コード例 #1
0
        public BobController(BobControllerData data, QueryConnection queryConnection)
        {
            if (queryConnection == null)
            {
                throw new ArgumentNullException(nameof(queryConnection));
            }

            timeout                             = TickPool.RegisterTick(TimeoutCheck, TimeSpan.FromMilliseconds(100), false);
            musicInfoWaiter                     = new WaitEventBlock <MusicData>();
            isRunning                           = false;
            awaitingConnect                     = false;
            this.bobControllerData              = data;
            this.queryConnection                = queryConnection;
            queryConnection.OnMessageReceived  += GetResponse;
            queryConnection.OnClientConnect    += OnBobConnect;
            queryConnection.OnClientDisconnect += OnBobDisconnnect;
            commandQueue                        = new Queue <string>();
            channelSubscriptions                = new Dictionary <int, SubscriptionData>();
        }
コード例 #2
0
		public BobController(BobControllerData data, QueryConnection queryConnection)
		{
			if (queryConnection == null)
				throw new ArgumentNullException(nameof(queryConnection));

			timeout = TickPool.RegisterTick(TimeoutCheck, TimeSpan.FromMilliseconds(100), false);
			musicInfoWaiter = new WaitEventBlock<MusicData>();
			isRunning = false;
			awaitingConnect = false;
			this.bobControllerData = data;
			this.queryConnection = queryConnection;
			queryConnection.OnMessageReceived += GetResponse;
			queryConnection.OnClientConnect += OnBobConnect;
			queryConnection.OnClientDisconnect += OnBobDisconnnect;
			commandQueue = new Queue<string>();
			channelSubscriptions = new Dictionary<int, SubscriptionData>();
		}