예제 #1
0
 internal void OnNotification(object O, NpgsqlNotificationEventArgs E)
 {
     if (Notification != null)
     {
         Notification(this, E);
     }
 }
예제 #2
0
파일: DbConnManager.cs 프로젝트: vzrus/VZF
 /// <summary>
 /// The connection_ info message.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The e.
 /// </param>
 public static void Connection_InfoMessage(object sender, NpgsqlNotificationEventArgs e)
 {
     if (InfoMessage != null)
     {
         InfoMessage(sender, e: new YafDBConnInfoMessageEventArgs(e.PID.ToString(CultureInfo.InvariantCulture) + ":::" + e.Condition));
     }
 }
예제 #3
0
 internal void OnNotification(object o, NpgsqlNotificationEventArgs e)
 {
     if (Notification != null)
     {
         Notification(this, e);
     }
 }
예제 #4
0
 internal void FireNotification(NpgsqlNotificationEventArgs e)
 {
     if (Notification != null)
     {
         try
         {
             Notification(this, e);
         }
         catch
         {
         } //Eat exceptions from user code.
     }
 }
예제 #5
0
 internal void FireNotification(NpgsqlNotificationEventArgs e)
 {
     if (Notification != null)
     {
         try
         {
             Notification(this, e);
         }
         catch
         {
         } //Eat exceptions from user code.
     }
 }
예제 #6
0
 internal void OnNotification(object O, NpgsqlNotificationEventArgs E)
 {
     if (Notification != null)
     {
         Notification(this, E);
     }
 }
예제 #7
0
 private void NotificationSupportHelper(Object sender, NpgsqlNotificationEventArgs args)
 {
     RecievedNotification = true;
 }
 /// <summary>
 /// The connection_ info message.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The e.
 /// </param>
 /// <summary>
 /// The connection_ info message.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The e.
 /// </param>
 protected void Connection_InfoMessage(object sender, NpgsqlNotificationEventArgs e)
 {
     if (InfoMessage != null)
     {
     InfoMessage(this, new YafDBConnInfoMessageEventArgs(e.PID.ToString() + ":::" + e.Condition));
     }
 }
예제 #9
0
 public void AddNotification(NpgsqlNotificationEventArgs data)
 {
     _notifications.Add(data);
 }
예제 #10
0
 public void AddNotification(NpgsqlNotificationEventArgs data)
 {
     _notifications.Add(data);
 }
예제 #11
0
		private void NotificationSupportHelper(Object sender, NpgsqlNotificationEventArgs args)
		{
		  throw new InvalidOperationException();
		}
예제 #12
0
 //функция получения notify
 private void conNotify(Object sender, NpgsqlNotificationEventArgs args)
 {
     this.parent.toLog(0,args.Condition + "  " + args.AdditionalInformation);
     switch (args.AdditionalInformation)
     {
         case "spot_orders":
             this.lastNotifyTime = DateTime.Now;
             this.addNotifyToQueue(args.AdditionalInformation);
             break;
         case "test":
             this.lastNotifyTime = DateTime.Now;
             this.parent.toLog(0,"Получено тестовое сообщение ");
             break;
     }
 }
예제 #13
0
 private static void ConnectionNotification(object sender, NpgsqlNotificationEventArgs e)
 {
     Console.WriteLine($"[{DateTime.Now}] Notification arrived! Thread id: {Thread.CurrentThread.ManagedThreadId}. Additional information: {e.AdditionalInformation}");
 }
예제 #14
0
 internal void OnNotification(object o, NpgsqlNotificationEventArgs e)
 {
     if (Notification != null)
     {
         Notification(this, e);
     }
 }
예제 #15
0
 //функция получения notify
 private void conNotify(Object sender, NpgsqlNotificationEventArgs args)
 {
     switch (args.AdditionalInformation)
     {
         case "uxf_fut_orders":
         case "uxf_opt_orders":
         case "uxf_change_client_money":
             this.lastNotifyTime = DateTime.Now;
             this.parent.logMsg(args.Condition + "  " + args.AdditionalInformation);
             this.addNotifyToQueue(args.AdditionalInformation);
             break;
         case "test":
             this.lastNotifyTime = DateTime.Now;
             this.parent.logService("Получено тестовое сообщение " +args.Condition + "  " + args.AdditionalInformation);
             break;
     }
 }