public ServiceHostDecorator(Type serviceType)
        {
            this.serviceType = serviceType;
            uris             = ServiceRouterHost.GetUris();
            host             = new ExtendedServiceHost(serviceType, uris);
            host.Closing    += new EventHandler(ServiceRouterHost.Host_Closing);
            host.Faulted    += new EventHandler(ServiceRouterHost.Host_Faulted);
            //IServiceBehavior behavior = new EndpointBehavior();
            //host.Description.Behaviors.Add(behavior);


            //BindingElementCollection serviceBec = new BindingElementCollection();
            //SecurityBindingElement serviceSbe = SecurityBindingElement.CreateUserNameForCertificateBindingElement();
            //serviceSbe.EnableUnsecuredResponse = true;
            //serviceBec.Add(serviceSbe);
            //serviceBec.Add(new TextMessageEncodingBindingElement());
            //serviceBec.Add(new HttpTransportBindingElement());
            //Binding serviceBinding = new CustomBinding(serviceBec);
            //host.AddServiceEndpoint()
        }
 public void Open()
 {
     host.Open();
     ServiceRouterHost.RegisterWithRouter(host);
 }