public void UpdateDirectMessages(int userid, int targetid, string caller) { if (this.connected_id == -1) { this.connected_id = userid; } if (this.hubcaller == null) { hubcaller = caller; } this.targetid = targetid; if (Callback == null) { Callback = OperationContext.Current.GetCallbackChannel <IUpdateNotificationCallback>(); } if (MessagenTimer == null) { MessagenTimer = new System.Timers.Timer(2000); MessagenTimer.Elapsed += MessageOnNotificationTimerElapsed; MessagenTimer.Enabled = true; MessagenTimer.Start(); } }
/// <summary> /// /// </summary> /// <param name="FileName"></param> public void UpdateNotifications(int userid, string hubcaller) { if (this.connected_id == -1) { this.connected_id = userid; } if (this.hubcaller == null) { this.hubcaller = hubcaller; } if (Callback == null) { Callback = OperationContext.Current.GetCallbackChannel <IUpdateNotificationCallback>(); } if (NotificationTimer == null) { NotificationTimer = new System.Timers.Timer(5000); NotificationTimer.Elapsed += NotificationOnNotificationTimerElapsed; NotificationTimer.Enabled = true; NotificationTimer.Start(); } }