Skip to content

Commit

Permalink
Removed extra formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cromefire committed Feb 24, 2023
1 parent 2c242c5 commit 7415513
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/OpenTelemetry/Trace/Builder/TracerProviderBuilderBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ public TracerProviderBuilderBase()
.AddOpenTelemetrySharedProviderBuilderServices()
.AddOpenTelemetryTracerProviderBuilderServices()
.TryAddSingleton<TracerProvider>(
sp => throw new NotSupportedException(
"Self-contained TracerProvider cannot be accessed using the application IServiceProvider call Build instead."));
sp => throw new NotSupportedException("Self-contained TracerProvider cannot be accessed using the application IServiceProvider call Build instead."));

services.ConfigureOpenTelemetryTracerProvider((sp, builder) => this.services = null);

Expand Down Expand Up @@ -70,8 +69,7 @@ internal TracerProviderBuilderBase(IServiceCollection services)
TracerProvider? ITracerProviderBuilder.Provider => null;

/// <inheritdoc />
public override TracerProviderBuilder AddInstrumentation<TInstrumentation>(
Func<TInstrumentation> instrumentationFactory)
public override TracerProviderBuilder AddInstrumentation<TInstrumentation>(Func<TInstrumentation> instrumentationFactory)
{
Guard.ThrowIfNull(instrumentationFactory);

Expand Down Expand Up @@ -114,8 +112,7 @@ TracerProviderBuilder ITracerProviderBuilder.ConfigureServices(Action<IServiceCo
=> this.ConfigureServicesInternal(configure);

/// <inheritdoc />
TracerProviderBuilder IDeferredTracerProviderBuilder.Configure(
Action<IServiceProvider, TracerProviderBuilder> configure)
TracerProviderBuilder IDeferredTracerProviderBuilder.Configure(Action<IServiceProvider, TracerProviderBuilder> configure)
=> this.ConfigureBuilderInternal(configure);

internal TracerProvider InvokeBuild()
Expand Down Expand Up @@ -157,8 +154,7 @@ protected TracerProvider Build()
{
if (!this.allowBuild)
{
throw new NotSupportedException(
"A TracerProviderBuilder bound to external service cannot be built directly. Access the TracerProvider using the application IServiceProvider instead.");
throw new NotSupportedException("A TracerProviderBuilder bound to external service cannot be built directly. Access the TracerProvider using the application IServiceProvider instead.");
}

var services = this.services;
Expand Down

0 comments on commit 7415513

Please sign in to comment.