Example #1
0
        /// <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");
            }
            }
        }
Example #2
0
        //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");
            }
            }
        }
Example #3
0
        /// <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");
            }
            }
        }