public PullFixture() { Pull = new MessagePuller(9101); Handler = new TestPullHandler(); Pull.SetReceiveHandleEvent(Handler); Pull.Listen(); }
public SyncWindow() : base(Gtk.WindowType.Toplevel) { appContext = AppContext.Default; this.Build(); #if !DEBUG btnOnce.Visible = false; #endif yamsterCoreDb = appContext.YamsterCoreDb; messagePuller = appContext.MessagePuller; messagePuller.CallingService += messagePuller_CallingService; messagePuller.UpdatedDatabase += messagePuller_UpdatedDatabase; messagePuller.Error += messagePuller_Error; messagePuller.EnabledChanged += messagePuller_EnabledChanged; radAlgorithmBulkDownload.Active = true; UpdateUI(); GLib.Timeout.Add(1000, OnPollTimer); }
public void PushPull() { var pull = new MessagePuller(9100); pull.SetReceiveHandleEvent(new TestPullHandler()); pull.Listen(); var Push = new MessagePusher("localhost", 9100); pull.Close(); Push.Close(); }
public override void Destroy() { if (!destroyed) { if (messagePuller != null) { messagePuller.CallingService -= messagePuller_CallingService; messagePuller.UpdatedDatabase -= messagePuller_UpdatedDatabase; messagePuller.Error -= messagePuller_Error; messagePuller = null; } } destroyed = true; base.Destroy(); }