Table of Contents

Class TreeCollectionBuilder

Namespace
Umbraco.Cms.Web.BackOffice.Trees
Assembly
Umbraco.Web.BackOffice.dll

Builds a Umbraco.Cms.Core.Trees.TreeCollection.

public class TreeCollectionBuilder : ICollectionBuilder<TreeCollection, Tree>, ICollectionBuilder
Inheritance
TreeCollectionBuilder
Implements
ICollectionBuilder<TreeCollection, Tree>
ICollectionBuilder
Inherited Members

Constructors

TreeCollectionBuilder()

public TreeCollectionBuilder()

Methods

AddTree(Tree)

Registers a custom tree definition

public void AddTree(Tree treeDefinition)

Parameters

treeDefinition Tree

Remarks

This is useful if a developer wishes to have a single tree controller for different tree aliases. In this case the tree controller cannot be decorated with the TreeAttribute (since then it will be auto-registered).

AddTreeController(Type)

public void AddTreeController(Type controllerType)

Parameters

controllerType Type

AddTreeController<TController>()

public void AddTreeController<TController>() where TController : TreeControllerBase

Type Parameters

TController

AddTreeControllers(IEnumerable<Type>)

public void AddTreeControllers(IEnumerable<Type> controllerTypes)

Parameters

controllerTypes IEnumerable<Type>

CreateCollection(IServiceProvider)

public TreeCollection CreateCollection(IServiceProvider factory)

Parameters

factory IServiceProvider

Returns

TreeCollection

RegisterWith(IServiceCollection)

public void RegisterWith(IServiceCollection services)

Parameters

services IServiceCollection

RemoveTree(Tree)

public void RemoveTree(Tree treeDefinition)

Parameters

treeDefinition Tree

RemoveTreeController(Type)

public void RemoveTreeController(Type type)

Parameters

type Type

RemoveTreeController<T>()

public void RemoveTreeController<T>() where T : TreeControllerBase

Type Parameters

T

RemoveTreeControllers(IEnumerable<Type>)

public void RemoveTreeControllers(IEnumerable<Type> controllerTypes)

Parameters

controllerTypes IEnumerable<Type>