using System; namespace Notepad.Infrastructure.Container { public static class Resolve { private static IDependencyRegistry underlyingRegistry; public static void InitializeWith(IDependencyRegistry registry) { underlyingRegistry = registry; } public static DependencyToResolve DependencyFor() { try { return underlyingRegistry.FindAnImplementationOf(); } catch (Exception e) { throw new DependencyResolutionException(e); } } } }