public static bool IsLockingRequiredForOutput(this IOutputDevice outputDevice) { return(outputDevice.GetType().GetMethod("Output").GetCustomAttribute <LockingRequiredAttribute>()?.IsLockingRequired ?? false); }
public static bool IsLockingRequiredForDispose(this IOutputDevice outputDevice) { return(outputDevice.GetType().GetMethod("Dispose").GetCustomAttribute <LockingRequiredAttribute>()?.IsLockingRequired ?? true); }