public WebHttpBinding (WebHttpSecurityMode mode) { security.Mode = mode; // MSDN says that this security mode can be set only // at .ctor(), so there is no problem on depending on // this value here. t = mode == WebHttpSecurityMode.Transport ? new HttpsTransportBindingElement () : new HttpTransportBindingElement (); t.ManualAddressing = true; }