Skip to main content
Namespace: Phoenix.ComponentClient
Assembly: Phoenix.ComponentClient.dll
This class sets up a static handler for Phoenix.DotNetUtils.FileDeleter.OnFileDeleteFailure that prevents the exceptions from being thrown back to the application and instead logs to a standard Microsoft.Extensions.Logging logger. It will remove itself as a handler on dispose.

Inheritance

object ← AbstractDisposable ← OnFileDeleteFailureLogger

Implements

IDisposable

Inherited Members

AbstractDisposable.disposed, AbstractDisposable.Dispose(), AbstractDisposable.IsDisposed, AbstractDisposable.Dispose(bool), object.Equals(object), object.Equals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object, object), object.ToString()

Remarks

Phoenix.ComponentClient.OnFileDeleteFailureLogger.ConfigureServiceCollection(Microsoft.Extensions.DependencyInjection.IServiceCollection) for a common pattern of how to set this up in your application.

Constructors

OnFileDeleteFailureLogger(ILogger<FileDeleter>) Creates a new instance and sets up Phoenix.DotNetUtils.FileDeleter.OnFileDeleteFailure.

Methods

ConfigureServiceCollection(IServiceCollection) Sets up the IServiceCollection with a singleton instance of this class that will be cleaned up when the IServiceProvider is Disposed. Note, after using this function you still need to cause the lazy load to happen by calling serviceProvider.GetRequiredService<OnFileDeleteFailureLogger>(). Dispose(bool) Standard disposal.