Beispiel #1
0
        public static void Dispose <T>(this ExtensionPoint <T> extensionPoint)
        {
            var disposable = extensionPoint.ExtendedValue as IDisposable;

            disposable.Maybe(d => d.Dispose());
        }
Beispiel #2
0
        public static IDisposable Using <T>(this ExtensionPoint <T> extensionPoint)
        {
            var disposable = extensionPoint.ExtendedValue as IDisposable;

            return(disposable ?? NullDisposable.Instance);
        }
Beispiel #3
0
 public static bool IsDefault <T>(this ExtensionPoint <T> extensionPoint)
 {
     return(Equals(extensionPoint.ExtendedValue, default(T)));
 }