diff --git a/sdk/src/Handlers/AspNetCore/AWSXRayMiddlewareExtensions.cs b/sdk/src/Handlers/AspNetCore/AWSXRayMiddlewareExtensions.cs index 1fb2baa1..555d99a1 100644 --- a/sdk/src/Handlers/AspNetCore/AWSXRayMiddlewareExtensions.cs +++ b/sdk/src/Handlers/AspNetCore/AWSXRayMiddlewareExtensions.cs @@ -1,78 +1,78 @@ -//----------------------------------------------------------------------------- -// -// Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// -//----------------------------------------------------------------------------- -using Amazon.XRay.Recorder.Core.Strategies; +//----------------------------------------------------------------------------- +// +// Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://aws.amazon.com/apache2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. +// +//----------------------------------------------------------------------------- +using Amazon.XRay.Recorder.Core.Strategies; using Amazon.XRay.Recorder.Handlers.AspNetCore.Internal; -using Microsoft.Extensions.Configuration; - -namespace Microsoft.AspNetCore.Builder -{ - /// - /// The Middleware Extension to intercept HTTP request for ASP.NET Core. - /// For each request, will try to parse trace header - /// from HTTP request header, and determine if tracing is enabled. If enabled, it will - /// start a new segment before invoking inner handler. And end the segment before it returns - /// the response to outer handler. - /// - public static class AWSXRayMiddlewareExtensions - { +using Microsoft.Extensions.Configuration; + +namespace Microsoft.AspNetCore.Builder +{ + /// + /// The Middleware Extension to intercept HTTP request for ASP.NET Core. + /// For each request, will try to parse trace header + /// from HTTP request header, and determine if tracing is enabled. If enabled, it will + /// start a new segment before invoking inner handler. And end the segment before it returns + /// the response to outer handler. + /// + public static class AWSXRayMiddlewareExtensions + { /// - /// Adds to the applicaion's request pipeline. + /// Adds to the application's request pipeline. /// /// Instance of . /// Segment name. - /// Instance of instrumented with X-Ray middleware. - public static IApplicationBuilder UseXRay(this IApplicationBuilder builder, string segmentName) - { - return builder.UseMiddleware(segmentName); - } - + /// Instance of instrumented with X-Ray middleware. + public static IApplicationBuilder UseXRay(this IApplicationBuilder builder, string segmentName) + { + return builder.UseMiddleware(segmentName); + } + /// - /// Adds to the applicaion's request pipeline. + /// Adds to the application's request pipeline. /// /// Instance of /// Segment name. /// - /// Instance of instrumented with X-Ray middleware. - public static IApplicationBuilder UseXRay(this IApplicationBuilder builder, string segmentName, IConfiguration configuration) - { - return builder.UseMiddleware(segmentName, configuration); - } - + /// Instance of instrumented with X-Ray middleware. + public static IApplicationBuilder UseXRay(this IApplicationBuilder builder, string segmentName, IConfiguration configuration) + { + return builder.UseMiddleware(segmentName, configuration); + } + /// - /// Adds to the applicaion's request pipeline. + /// Adds to the application's request pipeline. /// /// Instance of . /// - /// Instance of instrumented with X-Ray middleware. - public static IApplicationBuilder UseXRay(this IApplicationBuilder builder, SegmentNamingStrategy segmentNamingStrategy) - { - return builder.UseMiddleware(segmentNamingStrategy); - } - + /// Instance of instrumented with X-Ray middleware. + public static IApplicationBuilder UseXRay(this IApplicationBuilder builder, SegmentNamingStrategy segmentNamingStrategy) + { + return builder.UseMiddleware(segmentNamingStrategy); + } + /// - /// Adds to the applicaion's request pipeline. + /// Adds to the application's request pipeline. /// /// Instance of . /// /// - /// Instance of instrumented with X-Ray middleware. - public static IApplicationBuilder UseXRay(this IApplicationBuilder builder, SegmentNamingStrategy segmentNamingStrategy, IConfiguration configuration) - { - return builder.UseMiddleware(segmentNamingStrategy, configuration); - } - } -} \ No newline at end of file + /// Instance of instrumented with X-Ray middleware. + public static IApplicationBuilder UseXRay(this IApplicationBuilder builder, SegmentNamingStrategy segmentNamingStrategy, IConfiguration configuration) + { + return builder.UseMiddleware(segmentNamingStrategy, configuration); + } + } +}