コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NewLogNumberBroadcaster"/> class.
        /// </summary>
        public NewLogNumberBroadcaster()
        {
            NinjectWebCommon.Kernel.Inject(this);

            hubContext     = GlobalHost.ConnectionManager.GetHubContext <NewLogsNumberHub>();
            itemsViewModel = new NumberOfNewLogItemsViewModel();

            // Start the broadcast loop
            broadcastLoop = new Timer(
                BroadcastNumbers,
                null,
                broadcastInterval,
                broadcastInterval);
        }
コード例 #2
0
 /// <summary>
 /// Updates the model.
 /// </summary>
 /// <param name="clientItemsViewModel">The client items view model.</param>
 public void UpdateModel(NumberOfNewLogItemsViewModel clientItemsViewModel)
 {
     itemsViewModel = clientItemsViewModel;
 }