示例#1
0
        internal EndpointAddress GetEndpointAddress(string server)
        {
            Uri uri = _serverUriFactory.Create(server);
            EndpointIdentity identity = EndpointIdentity.CreateDnsIdentity("localhost");

            return(new EndpointAddress(uri, identity, new AddressHeaderCollection()));
        }
示例#2
0
        public void Start()
        {
            Uri address = _serverUriFactory.Create(_server);

            _host = new ServiceHost(_service, address);
            Binding binding = _defaultBindingFactory.Create();

            _host.AddServiceEndpoint(typeof(IService), binding, "");
            _host.Open();
        }