public RepositoryItemBuilder WithItemType(ItemId.ItemType itemType) { return(new RepositoryItemBuilder(this) { id = new ItemId(itemType, ++NextId) }); }
protected static RepositoryItem AddChild(RepositoryItem parent, ItemId.ItemType itemType) { return(itemType == ItemId.ItemType.Package ? AddChild(parent, ARepositoryItem .WithItemType(itemType).WithParent(new RepositoryItemBuilder().WithId(parent.Id))) : AddChild(parent, ARepositoryItem .WithItemType(itemType).WithParent(new RepositoryItemBuilder().WithId(parent.Id)))); }