public AVRendererDiscovery(DiscoveryHandler OnRendererCallback)
        {
            PollTimer.Interval   = 500;
            PollTimer.OnElapsed += new SafeTimer.TimeElapsedHandler(PollSink);

            _New     = new AVTargetDiscovery.ManagerHandler(AddSink);
            _Removed = new AVTargetDiscovery.ManagerHandler(RemovedSink);

            OnRenderer += OnRendererCallback;
            lock (this)
            {
                if (disco == null)
                {
                    disco = new AVTargetDiscovery();
                }
                if (OnRenderer != null)
                {
                    foreach (AVRenderer r in disco.GetRenderers())
                    {
                        OnRenderer(this, r);
                    }
                }
                disco.AddWeakEvent_OnRenderer(_New);
                disco.AddWeakEvent_RemovedRenderer(_Removed);
            }
            if (AVRendererDiscovery.PollPositionEnabled)
            {
                PollTimer.Start();
            }
        }
Beispiel #2
0
		public AVRendererDiscovery(DiscoveryHandler OnRendererCallback)
		{
			PollTimer.Interval = 500;
			PollTimer.OnElapsed += new SafeTimer.TimeElapsedHandler(PollSink);

			_New = new AVTargetDiscovery.ManagerHandler(AddSink);
			_Removed = new AVTargetDiscovery.ManagerHandler(RemovedSink);

			OnRenderer += OnRendererCallback;
			lock(this)
			{
				if(disco==null)
				{
					disco = new AVTargetDiscovery();
				}
				if(OnRenderer!=null)
				{
					foreach(AVRenderer r in disco.GetRenderers())
					{
						OnRenderer(this,r);
					}
				}
				disco.AddWeakEvent_OnRenderer(_New);
				disco.AddWeakEvent_RemovedRenderer(_Removed);
			}
			if(AVRendererDiscovery.PollPositionEnabled)
			{
				PollTimer.Start();
			}
		}
Beispiel #3
0
 public override void PrintConsoleOptions()
 {
     Console.WriteLine(" D - Set store primary dataspace name");
     DiscoveryHandler.PrintConsoleOptions();
     ChannelHandler.PrintConsoleOptions();
     ObjectHandler.PrintConsoleOptions();
 }
 public void GetZebraUsbDirectPrinters(DiscoveryHandler discoveryHandler)
 {
     try {
         foreach (DiscoveredUsbPrinter printer in UsbDiscoverer.GetZebraUsbPrinters())
         {
             discoveryHandler.FoundPrinter(printer);
         }
         discoveryHandler.DiscoveryFinished();
     } catch (Exception e) {
         discoveryHandler.DiscoveryError(e.Message);
     }
 }
Beispiel #5
0
 public override bool HandleConsoleInput(ConsoleKeyInfo info)
 {
     if (IsKey(info, "D"))
     {
         Console.WriteLine("Enter store primary dataspace name:");
         var dataspaceName = Console.ReadLine();
         Console.WriteLine();
         Store.RenameDataspace(dataspaceName);
         return(true);
     }
     else
     {
         return(DiscoveryHandler.HandleConsoleInput(info) || ChannelHandler.HandleConsoleInput(info) || ObjectHandler.HandleConsoleInput(info));
     }
 }
        public async Task GetPublishedEvents()
        {
            var discoveryHandler = new DiscoveryHandler(
                null,
                null,
                EventsPublishedByService.Reachable(
                    new ServiceEndPoint(null),
                    new List <EventSchema>()),
                null,
                null,
                null);

            var events = await discoveryHandler.GetPublishedEvents();

            Assert.IsNotNull(events);
        }
        public async Task GetConsumingServices_Null()
        {
            var statusRepository = new StatusRepositoryMongoDb(EventMongoDb, new EventLocationCache());

            var discoveryHandler = new DiscoveryHandler(
                new ServiceBaseAddressCollection(),
                new EventsSubscribedByService(new List <EventSchema>(), new List <ReadModelSubscription>()),
                null,
                new DiscoveryRepository(new DiscoveryClientFactory(new MyMicrowaveHttpClientFactory()), new MicrowaveLogger <DiscoveryRepository>()),
                statusRepository,
                new DiscoveryConfiguration());

            var consumingServices = await discoveryHandler.GetConsumingServices();

            Assert.IsNotNull(consumingServices);
        }
 public void GetZebraUsbDirectPrinters(DiscoveryHandler discoveryHandler)
 {
     throw new NotImplementedException();
 }
 public void FindBluetoothPrinters(DiscoveryHandler discoveryHandler)
 {
     BluetoothDiscoverer.FindPrinters(discoveryHandler);
 }
Beispiel #10
0
 public void FindBluetoothPrinters(DiscoveryHandler discoveryHandler)
 {
     BluetoothDiscoverer.FindPrinters(global::Android.App.Application.Context, discoveryHandler);
 }
Beispiel #11
0
 public void GetZebraUsbDirectPrinters(DiscoveryHandler discoveryHandler)
 {
     UsbDiscoverer.FindPrinters(global::Android.App.Application.Context, discoveryHandler);
 }
 public void FindUrlPrinters(string nfcData, DiscoveryHandler discoveryHandler)
 {
     throw new NotImplementedException();
 }
Beispiel #13
0
 public override void PrintConsoleOptions()
 {
     DiscoveryHandler.PrintConsoleOptions();
     ChannelHandler.PrintConsoleOptions();
     ObjectHandler.PrintConsoleOptions();
 }
 public void FindUrlPrinters(string nfcData, DiscoveryHandler discoveryHandler)
 {
     UrlPrinterDiscoverer.FindPrinters(nfcData, discoveryHandler);
 }
Beispiel #15
0
 protected override void InitializeRegistrarCore()
 {
     DiscoveryHandler.InitializeRegistrar(Registrar);
     ChannelHandler.InitializeRegistrar(Registrar);
     ObjectHandler.InitializeRegistrar(Registrar);
 }
Beispiel #16
0
 protected override void InitializeSessionCore()
 {
     DiscoveryHandler.InitializeSession(Session);
     ChannelHandler.InitializeSession(Session);
     ObjectHandler.InitializeSession(Session);
 }
Beispiel #17
0
 private void Awake()
 {
     DiscoveryHandler.I = this;
 }
Beispiel #18
0
 public override bool HandleConsoleInput(ConsoleKeyInfo info)
 {
     return(DiscoveryHandler.HandleConsoleInput(info) || ChannelHandler.HandleConsoleInput(info) || ObjectHandler.HandleConsoleInput(info));
 }
 public void FindUrlPrinters(string nfcData, DiscoveryHandler discoveryHandler)
 {
     UrlPrinterDiscoverer.FindPrinters(nfcData, discoveryHandler, Android.App.Application.Context);
 }