title: How do I pass parameters to a ServiceHost
body: <p>I am doing the following</p>
  
  <pre><code> //Define the service host
          this._smeediPluginServiceHost = new ServiceHost(typeof(SmeediServiceHost), smeediServiceUri);
          this._smeediPluginServiceHost.AddServiceEndpoint(typeof(ISmeediServiceHost), GetBinding(), smeediServiceUri);
          SetupAndStartWebService(_smeediPluginServiceHost); 
  
  
    private void SetupAndStartWebService(ServiceHost serviceHost, ServiceDiscoveryBehavior serviceDiscoveryBehavior = null)
      {
          //Define service behaviours
          ServiceMetadataBehavior serviceMetadataBehavior = new ServiceMetadataBehavior();
          serviceMetadataBehavior.HttpGetEnabled = true;
  
          //Add the behaviours to the service
          serviceHost.Description.Behaviors.Add(serviceMetadataBehavior);
  
          if (serviceDiscoveryBehavior != null)
              serviceHost.Description.Behaviors.Add(serviceDiscoveryBehavior);
  
          serviceHost.Open();
      }  
  </code></pre>
  
  <p>I need to pass a parameter to the Service and I can't figure out how. I have looked at <a href="https://stackoverflow.com/questions/2454850/how-do-i-pass-values-to-the-constructor-on-my-wcf-service">How do I pass values to the constructor on my wcf service?</a> but couldn't get my head around it. Thanks</p>