Exemple #1
0
 internal Component(Type type,
                    ILiftTimeScope liftTimeScope,
                    string name,
                    IBindingTarget bingingTarget
                    )
 {
     this.target        = type;
     this.name          = name;
     this.bingingTarget = bingingTarget;
     this.liftTimeScope = liftTimeScope;
 }
Exemple #2
0
    public Component CreateComponent(Multimap <Type, Component> dependents)
    {
        if (liftTimeScope == null)
        {
            liftTimeScope = new TransientScope();
        }

        InjectProperty[] propertyarray = propertys.ToArray();
        InjectMethod[]   methodsarray  = methods.ToArray();

        var component = new Component(target, liftTimeScope, name, new BindingTarget(source, propertyarray, methodsarray));

        foreach (Type type in injects)
        {
            dependents.Add(type, component);
        }
        return(component);
    }
Exemple #3
0
 public void Singleton()
 {
     liftTimeScope = new SingletonScope();
 }