Exemplo 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();
        }
Exemplo 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();
        }
Exemplo n.º 3
0
 protected BaseServiceDetector(CompositionHinter hinter)
 {
     this.hinter = hinter;
 }
Exemplo n.º 4
0
 public ServiceSetComposer(CompositionHinter hinter)
 {
     this.hinter = hinter;
 }
Exemplo n.º 5
0
 public ServiceSetComposer(CompositionHinter hinter)
 {
     this.hinter = hinter;
 }
Exemplo n.º 6
0
 public AdhocServiceDetector(CompositionHinter hinter)
     : base(hinter)
 {
 }
Exemplo n.º 7
0
 protected BaseServiceDetector(CompositionHinter hinter)
 {
     this.hinter = hinter;
 }
Exemplo n.º 8
0
 public AdhocServiceDetector(CompositionHinter hinter)
     : base(hinter)
 {
 }
Exemplo n.º 9
0
 public CachingServiceDetector(IServiceDetector realDetector, CompositionHinter hinter)
     : base(hinter)
 {
     this.realDetector = realDetector;
 }
Exemplo n.º 10
0
 public CachingServiceDetector(IServiceDetector realDetector, CompositionHinter hinter)
     : base(hinter)
 {
     this.realDetector = realDetector;
 }