예제 #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 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
                {}
            }
예제 #3
0
            public override bool Predicate(ServiceInfo2Wrapped info)
            {
                var info2 = new ServiceInfo2(info);

                return(_f(info2));
            }