public override Instance CloseType(Type[] types) { if (!_plugin.PluggedType.IsOpenGeneric()) { return(null); } Type closedType; try { closedType = _plugin.PluggedType.MakeGenericType(types); } catch { return(null); } var closedInstance = new ConstructorInstance(closedType); _dependencies.Each((key, i) => { if (i.CopyAsIsWhenClosingInstance) { closedInstance.SetChild(key, i); } }); return(closedInstance); }
public ConstructorInstance Override(ExplicitArguments arguments) { var instance = new ConstructorInstance(_plugin); _dependencies.Each((key, i) => instance.SetChild(key, i)); arguments.Configure(instance); return(instance); }
public PropertyExpression(ConstructorInstance instance, string propertyName) { _instance = instance; _propertyName = propertyName; }