private void copyChildArray(string name, Type childType) { InstanceMemento[] mementoes = _memento.GetChildrenArray(name) ?? new InstanceMemento[0]; var children = new Instance[mementoes.Length]; for (int i = 0; i < mementoes.Length; i++) { InstanceMemento memento = mementoes[i]; children[i] = memento.ReadInstance(_pluginGraph, childType); } _instance.SetCollection(name, children); }
/// <summary> /// Configures an array of Instance's for the array dependency /// </summary> /// <param name="instances"></param> /// <returns></returns> public ConfiguredInstance Contains(params Instance[] instances) { _instance.SetCollection(_propertyName, instances); return(_instance); }