Пример #1
0
 public PullFixture()
 {
     Pull    = new MessagePuller(9101);
     Handler = new TestPullHandler();
     Pull.SetReceiveHandleEvent(Handler);
     Pull.Listen();
 }
Пример #2
0
        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);
        }
Пример #3
0
        public void PushPull()
        {
            var pull = new MessagePuller(9100);

            pull.SetReceiveHandleEvent(new TestPullHandler());
            pull.Listen();

            var Push = new MessagePusher("localhost", 9100);

            pull.Close();
            Push.Close();
        }
Пример #4
0
 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();
 }