private ArrayContainer <TNestedField> createNestedContainer <TNestedField>( SingleContainer <TField> container, Func <TField, IEnumerable <TNestedField> > selector, string newUpdateString) { var newUpdateStrings = container.UpdateStrings.Concat(new[] { newUpdateString }); var newItems = selector(container.Item); return(new ArrayContainer <TNestedField>(newItems, newUpdateStrings)); }
private SingleContainer <TNestedField> createNestedContainer <TNestedField>( SingleContainer <TField> container, Func <TField, TNestedField> selector, string newUpdateString) { var newUpdateStrings = container.UpdateStrings.Concat(new[] { newUpdateString }); var newItem = selector(container.Item); return(new SingleContainer <TNestedField>(newItem, newUpdateStrings)); }