/// <summary> /// Access to all of the uncommon Instance types /// </summary> public CreatePluginFamilyExpression <TPluginType> AddSpecial(Action <IInstanceExpression <TPluginType> > configure) { var expression = new InstanceExpression <TPluginType>(AddInstance); configure(expression); return(this); }
/// <summary> /// Access to all of the uncommon Instance types /// </summary> /// <param name="configure"></param> /// <returns></returns> public CreatePluginFamilyExpression <PLUGINTYPE> AddSpecial(Action <IInstanceExpression <PLUGINTYPE> > configure) { var expression = new InstanceExpression <PLUGINTYPE>(i => Add(i)); configure(expression); return(this); }
/// <summary> /// Add multiple Instances to this PluginType /// </summary> public CreatePluginFamilyExpression <TPluginType> AddInstances(Action <IInstanceExpression <TPluginType> > action) { var list = new List <Instance>(); var child = new InstanceExpression <TPluginType>(list.Add); action(child); alter = family => list.Each(family.AddInstance); return(this); }
/// <summary> /// Add multiple Instance's to this PluginType /// </summary> /// <param name="action"></param> /// <returns></returns> public CreatePluginFamilyExpression <PLUGINTYPE> AddInstances(Action <IInstanceExpression <PLUGINTYPE> > action) { var list = new List <Instance>(); var child = new InstanceExpression <PLUGINTYPE>(i => list.Add(i)); action(child); return(alterAndContinue(family => { foreach (Instance instance in list) { family.AddInstance(instance); } })); }
/// <summary> /// Access to the uncommon types of Instance /// </summary> /// <param name="configure"></param> public void UseSpecial(Action <IInstanceExpression <T> > configure) { var expression = new InstanceExpression <T>(i => Use(i)); configure(expression); }