Esempio n. 1
0
        public MetaService()
        {
            ServiceState.RegisterStartupCondition(STARTUP_CONDITION);

            CompositionHinter hinter = new CompositionHinter(new ZeroconfDiscoverer());

            hinter.StartDiscovery();
            publishers = hinter.GetAvailablePublishers();
            detector   = new CachingServiceDetector(new AdhocServiceDetector(hinter), hinter);

            initialized           = false;
            ServiceState.Started += delegate()
            {
                initialized = true;
            };

            Task.Factory.StartNew(delegate()
            {
                // give it some time to detect all service sets
                Thread.Sleep(5000);
                foreach (var publisher in publishers)
                {
                    publisher.Detector = detector;
                    publisher.PublishAsync();
                }
                ServiceState.StartupConditionCompleted(STARTUP_CONDITION);
            });

            accessRequests = new AccessRequests();
        }
Esempio n. 2
0
        public MetaService()
        {
            ServiceState.RegisterStartupCondition(STARTUP_CONDITION);

            CompositionHinter hinter = new CompositionHinter(new ZeroconfDiscoverer());
            hinter.StartDiscovery();
            publishers = hinter.GetAvailablePublishers();
            detector = new CachingServiceDetector(new AdhocServiceDetector(hinter), hinter);

            initialized = false;
            ServiceState.Started += delegate()
            {
                initialized = true;
            };

            Task.Factory.StartNew(delegate()
            {
                // give it some time to detect all service sets
                Thread.Sleep(5000);
                foreach (var publisher in publishers)
                {
                    publisher.Detector = detector;
                    publisher.PublishAsync();
                }
                ServiceState.StartupConditionCompleted(STARTUP_CONDITION);
            });

            accessRequests = new AccessRequests();
        }
Esempio n. 3
0
 protected BaseServiceDetector(CompositionHinter hinter)
 {
     this.hinter = hinter;
 }
Esempio n. 4
0
 public ServiceSetComposer(CompositionHinter hinter)
 {
     this.hinter = hinter;
 }
 public ServiceSetComposer(CompositionHinter hinter)
 {
     this.hinter = hinter;
 }
 public AdhocServiceDetector(CompositionHinter hinter)
     : base(hinter)
 {
 }
Esempio n. 7
0
 protected BaseServiceDetector(CompositionHinter hinter)
 {
     this.hinter = hinter;
 }
Esempio n. 8
0
 public AdhocServiceDetector(CompositionHinter hinter)
     : base(hinter)
 {
 }
Esempio n. 9
0
 public CachingServiceDetector(IServiceDetector realDetector, CompositionHinter hinter)
     : base(hinter)
 {
     this.realDetector = realDetector;
 }
 public CachingServiceDetector(IServiceDetector realDetector, CompositionHinter hinter)
     : base(hinter)
 {
     this.realDetector = realDetector;
 }