internal void OnNotification(object O, NpgsqlNotificationEventArgs E) { if (Notification != null) { Notification(this, E); } }
/// <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)); } }
internal void OnNotification(object o, NpgsqlNotificationEventArgs e) { if (Notification != null) { Notification(this, e); } }
internal void FireNotification(NpgsqlNotificationEventArgs e) { if (Notification != null) { try { Notification(this, e); } catch { } //Eat exceptions from user code. } }
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)); } }
public void AddNotification(NpgsqlNotificationEventArgs data) { _notifications.Add(data); }
private void NotificationSupportHelper(Object sender, NpgsqlNotificationEventArgs args) { throw new InvalidOperationException(); }
//функция получения 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; } }
private static void ConnectionNotification(object sender, NpgsqlNotificationEventArgs e) { Console.WriteLine($"[{DateTime.Now}] Notification arrived! Thread id: {Thread.CurrentThread.ManagedThreadId}. Additional information: {e.AdditionalInformation}"); }
//функция получения 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; } }