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

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

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