示例#1
0
        public Dictionary <ServiceSubscriptionClientID, ServiceInfo2> GetDetectedServiceInfo2()
        {
            var o = new Dictionary <ServiceSubscriptionClientID, ServiceInfo2>();

            var c1 = _subscription.GetDetectedServiceInfo2();

            foreach (var c2 in c1)
            {
                var id   = new ServiceSubscriptionClientID(c2.Key);
                var stub = new ServiceInfo2(c2.Value);
                o.Add(id, stub);
            }

            return(o);
        }
示例#2
0
        public Dictionary <ServiceSubscriptionClientID, object> GetConnectedClients()
        {
            var o = new Dictionary <ServiceSubscriptionClientID, object>();

            var c1 = _subscription.GetConnectedClients();

            foreach (var c2 in c1)
            {
                var id   = new ServiceSubscriptionClientID(c2.Key);
                var stub = GetClientStub(c2.Value);
                o.Add(id, stub);
            }

            return(o);
        }
示例#3
0
            public override void ServiceLost(WrappedServiceInfo2Subscription subscription,
                                             WrappedServiceSubscriptionClientID id, ServiceInfo2Wrapped info)
            {
                var s = (ServiceInfo2Subscription)subscription1.Target;

                if (s == null)
                {
                    return;
                }
                var info1 = new ServiceInfo2(info);
                var id1   = new ServiceSubscriptionClientID(id);

                if (s.ServiceLost == null)
                {
                    return;
                }
                try
                {
                    s.ServiceLost(s, id1, info1);
                }
                catch
                {}
            }