main
 1using System;
 2
 3namespace jive
 4{
 5  static public class Resolve
 6  {
 7    static DependencyRegistry underlying_registry;
 8    static bool initialized;
 9
10    static public void initialize_with(DependencyRegistry registry)
11    {
12      underlying_registry = registry;
13      initialized = registry != null;
14    }
15
16    static public DependencyToResolve the<DependencyToResolve>()
17    {
18      try
19      {
20        return underlying_registry.get_a<DependencyToResolve>();
21      }
22      catch (Exception e)
23      {
24        throw new DependencyResolutionException<DependencyToResolve>(e);
25      }
26    }
27
28    static public bool is_initialized()
29    {
30      return initialized;
31    }
32  }
33}