summaryrefslogtreecommitdiff
path: root/code/common/Resolve.cs
blob: 36affbb9350567e3b5c276ef76e4ee9c4af7dc28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace common
{
    static public class Resolve
    {
        static DependencyRegistry underlying_registry;

        static public void initialize_with(DependencyRegistry registry)
        {
            underlying_registry = registry;
        }

        static public DependencyToResolve the<DependencyToResolve>()
        {
            return underlying_registry.get_a<DependencyToResolve>();
        }

        static public bool is_initialized()
        {
            return underlying_registry != null;
        }
    }
}