/// <summary> /// /// </summary> //<param name="mode">Allowed values are ServiceSecurity.None and ServiceSecurity.Anonymous</param> protected SecureDuplexClientBase(ServiceSecurity mode, InstanceContext <C> context) : base(context) { switch (mode) { case ServiceSecurity.None: { SecurityHelper.UnsecuredProxy(this); break; } case ServiceSecurity.Anonymous: { SecurityHelper.AnonymousProxy(this); break; } default: { throw new InvalidOperationException(mode + " is unsupported with this constructor"); } } }
//These constructors use configured endpoint /// <summary> /// /// </summary> //<param name="mode">Allowed values are ServiceSecurity.None and ServiceSecurity.Anonymous</param> protected SecureClientBase(ServiceSecurity mode, string endpointName) : base(endpointName) { switch (mode) { case ServiceSecurity.None: { SecurityHelper.UnsecuredProxy(this); break; } case ServiceSecurity.Anonymous: { SecurityHelper.AnonymousProxy(this); break; } default: { throw new InvalidOperationException(mode + " is unsupported with this constructor"); } } }
/// <summary> /// /// </summary> //<param name="mode">Allowed values are ServiceSecurity.None and ServiceSecurity.Anonymous</param> protected SecureDuplexClientBase(ServiceSecurity mode, C callback, Binding binding, EndpointAddress remoteAddress) : base(callback, binding, remoteAddress) { switch (mode) { case ServiceSecurity.None: { SecurityHelper.UnsecuredProxy(this); break; } case ServiceSecurity.Anonymous: { SecurityHelper.AnonymousProxy(this); break; } default: { throw new InvalidOperationException(mode + " is unsupported with this constructor"); } } }