public EndpointConfiguration(string code, EndpointConfigurationType type, Uri address, IConfigurationAuthentication authentication, IList <KeyValuePair <string, string> > parameters = null) { Code = code; Type = type; Address = address; Parameters = parameters; Authentication = authentication; }
public IWorkflowMessageTransportFactory CreateMessageTransportFactory(EndpointConfigurationType endpointConfigurationType) { var typeKey = endpointConfigurationType.ToString().ToLower(); if (_lifetimeScope.TryResolveKeyed(typeKey, typeof(IWorkflowMessageTransportFactory), out var workflowMessageTransportFactory)) { return((IWorkflowMessageTransportFactory)workflowMessageTransportFactory); } throw new NotSupportedException($"Workflow message transport {endpointConfigurationType} is not supported"); }
protected virtual System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfigurationType endpointConfigurationType) { if ((endpointConfigurationType == EndpointConfigurationType.BasicHttpBinding)) { var result = new BasicHttpBinding(); result.MaxBufferSize = int.MaxValue; result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; result.MaxReceivedMessageSize = int.MaxValue; result.AllowCookies = true; return(result); } if ((endpointConfigurationType == EndpointConfigurationType.NetTcpBinding)) { var result = new NetTcpBinding(); result.MaxBufferSize = int.MaxValue; result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; result.MaxReceivedMessageSize = int.MaxValue; return(result); } throw new System.InvalidOperationException(string.Format("\"Cannot find endpoint with name \'{0}\'.\"", endpointConfigurationType)); }