Esempio n. 1
0
        public void InterfaceInheritance()
        {
            var address = @"ipc:///test" + MethodBase.GetCurrentMethod().Name;
            var serv = new InheritanceService();
            var host = new ServiceHost(serv, new Uri(address));
            var b = new LocalBinding();
            host.AddServiceEndpoint(typeof(IInheritanceService), b, address);
            host.Open();
            var f = new ChannelFactory<IInheritanceService>(b);
            var c = f.CreateChannel(new EndpointAddress(address));
            c.Do();
            c.DoBase();

            host.Dispose();
        }
Esempio n. 2
0
        public void InterfaceInheritance()
        {
            var address = @"ipc:///test" + MethodBase.GetCurrentMethod().Name;
            var serv    = new InheritanceService();
            var host    = new ServiceHost(serv, new Uri(address));
            var b       = new LocalBinding();

            host.AddServiceEndpoint(typeof(IInheritanceService), b, address);
            host.Open();
            var f = new ChannelFactory <IInheritanceService>(b);
            var c = f.CreateChannel(new EndpointAddress(address));

            c.Do();
            c.DoBase();

            host.Dispose();
        }