コード例 #1
0
        /// <summary>
        /// Start using the middleware with SoapCore, with specific options.
        /// </summary>
        /// <typeparam name="EndPoint">The endpoint handling the WebConnector messages.</typeparam>
        /// <param name="app">AspNetCore ApplicationBuilder.</param>
        /// <param name="configuration">The configuration.</param>
        /// <returns></returns>
        public static IApplicationBuilder UseWebConnector <EndPoint>(
            this IApplicationBuilder app,
            Action <WebConnectorOptions> configuration
            )
        {
            var options = new WebConnectorOptions();

            configuration(options);

            app
            .UseSoapEndpoint(
                typeof(EndPoint),
                options.SoapPath,
                new SoapEncoderOptions()
            {
                ReaderQuotas   = XmlDictionaryReaderQuotas.Max,
                WriteEncoding  = Encoding.UTF8,
                MessageVersion = MessageVersion.Soap11
            },
                SoapSerializer.XmlSerializer,
                false,
                null,
                new BasicHttpBinding()
                );

            return(app);
        }
コード例 #2
0
        public static IApplicationBuilder UseWebConnector <EndPoint>(
            this IApplicationBuilder app,
            Action <WebConnectorOptions> configuration
            )
        {
            var options = new WebConnectorOptions();

            configuration(options);

            app
            .UseSoapEndpoint <EndPoint>(options.SoapPath, new BasicHttpBinding(), SoapSerializer.XmlSerializer);

            return(app);
        }