public static IApplicationBuilder UseSoapEndpoint(this IApplicationBuilder builder, Type type, string path, Binding binding, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, WsdlFileOptions wsdlFileOptions = null, bool indentXml = true, bool omitXmlDeclaration = true) { return(builder.UseSoapEndpoint <CustomMessage>(type, path, binding, serializer, caseInsensitivePath, soapModelBounder, wsdlFileOptions, indentXml, omitXmlDeclaration)); }
public static IApplicationBuilder UseSoapEndpoint <T_MESSAGE>(this IApplicationBuilder builder, Type type, string path, Binding binding, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, WsdlFileOptions wsdlFileOptions = null, bool indentXml = true, bool omitXmlDeclaration = true) where T_MESSAGE : CustomMessage, new() { var elements = binding.CreateBindingElements().FindAll <MessageEncodingBindingElement>(); var encoderOptions = new SoapEncoderOptions[elements.Count]; for (var i = 0; i < encoderOptions.Length; i++) { var encoderOption = new SoapEncoderOptions { MessageVersion = elements[i].MessageVersion, WriteEncoding = Encoding.UTF8, ReaderQuotas = XmlDictionaryReaderQuotas.Max }; if (elements[i] is TextMessageEncodingBindingElement textMessageEncodingBindingElement) { encoderOption.WriteEncoding = textMessageEncodingBindingElement.WriteEncoding; encoderOption.ReaderQuotas = textMessageEncodingBindingElement.ReaderQuotas; } encoderOptions[i] = encoderOption; } return(builder.UseSoapEndpoint <T_MESSAGE>(type, path, encoderOptions, serializer, caseInsensitivePath, soapModelBounder, binding, wsdlFileOptions, indentXml, omitXmlDeclaration)); }
public static IEndpointConventionBuilder UseSoapEndpoint(this IEndpointRouteBuilder routes, Type type, string pattern, SoapEncoderOptions[] encoders, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, Binding binding = null, WsdlFileOptions wsdlFileOptions = null, bool indentXml = true, bool omitXmlDeclaration = true) { return(UseSoapEndpoint <CustomMessage>(routes, type, pattern, encoders, serializer, caseInsensitivePath, soapModelBounder, binding, wsdlFileOptions, indentXml, omitXmlDeclaration)); }
public static IApplicationBuilder UseSoapEndpoint <T_MESSAGE>(this IApplicationBuilder builder, Type type, string path, SoapEncoderOptions[] encoderOptions, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, Binding binding = null, WsdlFileOptions wsdlFileOptions = null, bool indentXml = true, bool omitXmlDeclaration = true) where T_MESSAGE : CustomMessage, new() { var options = new SoapOptions { Binding = binding, CaseInsensitivePath = caseInsensitivePath, EncoderOptions = encoderOptions, Path = path, ServiceType = type, SoapSerializer = serializer, SoapModelBounder = soapModelBounder, WsdlFileOptions = wsdlFileOptions, IndentXml = indentXml, OmitXmlDeclaration = omitXmlDeclaration }; return(builder.UseMiddleware <SoapEndpointMiddleware <T_MESSAGE> >(options)); }
public static IEndpointConventionBuilder UseSoapEndpoint <T, T_MESSAGE>(this IEndpointRouteBuilder routes, string path, SoapEncoderOptions[] encoders, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, WsdlFileOptions wsdlFileOptions = null, bool indentXml = true, bool omitXmlDeclaration = true) where T_MESSAGE : CustomMessage, new() { return(routes.UseSoapEndpoint <T_MESSAGE>(typeof(T), path, encoders, serializer, caseInsensitivePath, soapModelBounder, null, wsdlFileOptions, indentXml, omitXmlDeclaration)); }
public static IEndpointConventionBuilder UseSoapEndpoint <T_MESSAGE>(this IEndpointRouteBuilder routes, Type type, string pattern, SoapEncoderOptions[] encoders, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, Binding binding = null, WsdlFileOptions wsdlFileOptions = null, bool indentXml = true, bool omitXmlDeclaration = true) where T_MESSAGE : CustomMessage, new() { var options = new SoapOptions { Binding = binding, CaseInsensitivePath = caseInsensitivePath, EncoderOptions = encoders, Path = pattern, ServiceType = type, SoapSerializer = serializer, SoapModelBounder = soapModelBounder, WsdlFileOptions = wsdlFileOptions, IndentXml = indentXml, OmitXmlDeclaration = omitXmlDeclaration }; var pipeline = routes .CreateApplicationBuilder() .UseMiddleware <SoapEndpointMiddleware <T_MESSAGE> >(options) .Build(); return(routes.Map(pattern, pipeline) .WithDisplayName("SoapCore")); }
public static IApplicationBuilder UseSoapEndpoint <T>(this IApplicationBuilder builder, string path, SoapEncoderOptions encoder, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, WsdlFileOptions wsdlFileOptions = null, bool indentXml = true, bool omitXmlDeclaration = true) { return(builder.UseSoapEndpoint(typeof(T), path, new[] { encoder }, serializer, caseInsensitivePath, soapModelBounder, null, wsdlFileOptions, indentXml, omitXmlDeclaration)); }
public static IEndpointConventionBuilder UseSoapEndpoint <T>(this IEndpointRouteBuilder routes, string path, Binding binding, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, WsdlFileOptions wsdlFileOptions = null, bool indentXml = true, bool omitXmlDeclaration = true) { return(routes.UseSoapEndpoint(typeof(T), path, binding, serializer, caseInsensitivePath, soapModelBounder, wsdlFileOptions: wsdlFileOptions, indentXml: indentXml, omitXmlDeclaration: omitXmlDeclaration)); }
public static IApplicationBuilder UseSoapEndpoint(this IApplicationBuilder builder, Type type, string path, SoapEncoderOptions[] encoderOptions, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, Binding binding = null, WsdlFileOptions wsdlFileOptions = null) { return(builder.UseSoapEndpoint <CustomMessage>(type, path, encoderOptions, serializer, caseInsensitivePath, soapModelBounder, binding, wsdlFileOptions)); }
public static IApplicationBuilder UseSoapEndpoint <T>(this IApplicationBuilder builder, string path, Binding binding, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, WsdlFileOptions wsdlFileOptions = null) { return(builder.UseSoapEndpoint(typeof(T), path, binding, serializer, caseInsensitivePath, soapModelBounder, wsdlFileOptions)); }
public static IEndpointConventionBuilder UseSoapEndpoint(this IEndpointRouteBuilder routes, Type type, string path, Binding binding, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, WsdlFileOptions wsdlFileOptions = null) { return(UseSoapEndpoint <CustomMessage>(routes, type, path, binding, serializer, caseInsensitivePath, soapModelBounder, wsdlFileOptions)); }
public static IEndpointConventionBuilder UseSoapEndpoint <T>(this IEndpointRouteBuilder routes, string path, SoapEncoderOptions[] encoders, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, WsdlFileOptions wsdlFileOptions = null) { return(routes.UseSoapEndpoint(typeof(T), path, encoders, serializer, caseInsensitivePath, soapModelBounder, null, wsdlFileOptions)); }
public static IEndpointConventionBuilder UseSoapEndpoint <T_MESSAGE>(this IEndpointRouteBuilder routes, Type type, string path, SoapEncoderOptions encoder, SoapSerializer serializer = SoapSerializer.DataContractSerializer, bool caseInsensitivePath = false, ISoapModelBounder soapModelBounder = null, Binding binding = null, WsdlFileOptions wsdlFileOptions = null) where T_MESSAGE : CustomMessage, new() { return(routes.UseSoapEndpoint <T_MESSAGE>(type, path, new[] { encoder }, serializer, caseInsensitivePath, soapModelBounder, binding, wsdlFileOptions)); }