public RepositoryItemBuilder WithItemType(ItemId.ItemType itemType)
 {
     return(new RepositoryItemBuilder(this)
     {
         id = new ItemId(itemType, ++NextId)
     });
 }
Exemple #2
0
 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))));
 }