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