Skip to content

Commit

Permalink
Removed disposable stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
phillip-haydon committed Dec 9, 2024
1 parent 8febc20 commit c83c6ab
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Mindscape.Raygun4Net.Extensions.Logging/RaygunLoggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public sealed class RaygunLoggerProvider : ILoggerProvider
private readonly RaygunClientBase _client;
private readonly RaygunLoggerSettings _settings;
private readonly ConcurrentDictionary<string, RaygunLogger> _loggers;
private bool _disposed;

/// <summary>
/// Initializes a new instance of the RaygunLoggerProvider.
Expand All @@ -35,11 +34,6 @@ public RaygunLoggerProvider(RaygunClientBase client, RaygunLoggerSettings settin
/// <exception cref="ObjectDisposedException">Thrown when the provider has been disposed.</exception>
public ILogger CreateLogger(string categoryName)
{
if (_disposed)
{
throw new ObjectDisposedException(nameof(RaygunLoggerProvider));
}

return _loggers.GetOrAdd(categoryName, CreateLoggerInternal);

RaygunLogger CreateLoggerInternal(string name)
Expand All @@ -50,10 +44,5 @@ RaygunLogger CreateLoggerInternal(string name)

public void Dispose()
{
if (!_disposed)
{
_disposed = true;
_loggers.Clear();
}
}
}

0 comments on commit c83c6ab

Please sign in to comment.