<PackageReference Include="System.Diagnostics.EventLog" Version="5.0.0-preview.2.20160.6" />

EventLogProviderDisabledException

Represents the exception that is thrown when a specified event provider name references a disabled event provider. A disabled event provider cannot publish events.
using System.Runtime.Serialization; namespace System.Diagnostics.Eventing.Reader { public class EventLogProviderDisabledException : EventLogException { public EventLogProviderDisabledException() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } protected EventLogProviderDisabledException(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } public EventLogProviderDisabledException(string message) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } public EventLogProviderDisabledException(string message, Exception innerException) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } } }