private void ProcessComponent(IBuildComponent component, BuildComponentFactory factory) { var step = FindOrCreateStep(component); if (step != null) { int quantity = step.CanProduceQuantity(component.StyleKey); if (quantity < component.Quantity) { var splitComponent = component.Split(factory, component.Quantity - quantity); PushPendingComponent(splitComponent); } step.AddOutput(component); } }
#pragma warning disable IDE0051 // Remove unused private members private IBuildComponent Split(BuildComponentFactory factory, IBuildComponent component, int quantity) #pragma warning restore IDE0051 // Remove unused private members { return(component.Split(factory, quantity)); }