Exemplo n.º 1
0
        private static Binding PrepareServiceEndPoint(WfServiceBindingMode bindingMode)
        {
            Binding result = null;

            switch (bindingMode)
            {
                case WfServiceBindingMode.WfRawContentWebHttpBinding:
                    result = new WfRawContentWebHttpBinding();
                    break;
                case WfServiceBindingMode.BasicHttpBinding:
                    result = new BasicHttpBinding();
                    break;
                case WfServiceBindingMode.WSHttpBinding:
                    result = new WSHttpBinding();
                    break;
                default:
                    throw new SystemSupportException(string.Format("不能支持的服务绑定模式:{0}", bindingMode));
            }

            return result;
        }
Exemplo n.º 2
0
        private static Binding PrepareServiceEndPoint(WfServiceBindingMode bindingMode)
        {
            Binding result = null;

            switch (bindingMode)
            {
            case WfServiceBindingMode.WfRawContentWebHttpBinding:
                result = new WfRawContentWebHttpBinding();
                break;

            case WfServiceBindingMode.BasicHttpBinding:
                result = new BasicHttpBinding();
                break;

            case WfServiceBindingMode.WSHttpBinding:
                result = new WSHttpBinding();
                break;

            default:
                throw new SystemSupportException(string.Format("不能支持的服务绑定模式:{0}", bindingMode));
            }

            return(result);
        }
Exemplo n.º 3
0
 public WfServiceHost(Type serviceType, Uri[] baseAddress, string implementedContract, bool atlasEnabled, WfServiceBindingMode bindingMode)
     : this(serviceType, baseAddress, implementedContract)
 {
     this._AtlasEnabled = atlasEnabled;
     this._BindingMode = bindingMode;
 }
Exemplo n.º 4
0
 public WfServiceHost(Type serviceType, Uri[] baseAddress, string implementedContract, bool atlasEnabled, WfServiceBindingMode bindingMode)
     : this(serviceType, baseAddress, implementedContract)
 {
     this._AtlasEnabled = atlasEnabled;
     this._BindingMode  = bindingMode;
 }