示例#1
0
 public TypeSingletonProvider(
     TypeSingletonLazyCreator lazyCreator,
     SingletonId id,
     SingletonRegistry singletonRegistry)
 {
     _singletonRegistry = singletonRegistry;
     _id          = id;
     _lazyCreator = lazyCreator;
     Init();
 }
示例#2
0
 public TypeSingletonProvider(
     TypeSingletonLazyCreator lazyCreator,
     SingletonId id,
     SingletonRegistry singletonRegistry)
 {
     _singletonRegistry = singletonRegistry;
     _id = id;
     _lazyCreator = lazyCreator;
     Init();
 }
示例#3
0
        TypeSingletonLazyCreator AddCreator(SingletonId id)
        {
            TypeSingletonLazyCreator creator;

            if (!_creators.TryGetValue(id, out creator))
            {
                creator = new TypeSingletonLazyCreator(id, this, _container);
                _creators.Add(id, creator);
            }

            return(creator);
        }
        TypeSingletonLazyCreator AddCreator(SingletonId id)
        {
            TypeSingletonLazyCreator creator;

            if (!_creators.TryGetValue(id, out creator))
            {
                creator = new TypeSingletonLazyCreator(id, this, _container);
                _creators.Add(id, creator);
            }

            return creator;
        }