Class SetCollectionBuilderBase<TBuilder, TCollection, TItem>
Implements an un-ordered collection builder.
Namespace: Umbraco.Core.Composing
Assembly: Umbraco.Core.dll
Syntax
public abstract class SetCollectionBuilderBase<TBuilder, TCollection, TItem> : CollectionBuilderBase<TBuilder, TCollection, TItem>, ICollectionBuilder<TCollection, TItem>, ICollectionBuilder where TBuilder : SetCollectionBuilderBase<TBuilder, TCollection, TItem> where TCollection : class, IBuilderCollection<TItem>
Type Parameters
Name | Description |
---|---|
TBuilder | The type of the builder. |
TCollection | The type of the collection. |
TItem | The type of the items. |
Remarks
A set collection builder is the most basic collection builder, where items are not ordered.
Properties
View SourceThis
Declaration
protected abstract TBuilder This { get; }
Property Value
Type | Description |
---|---|
TBuilder |
Methods
View SourceAdd(IEnumerable<Type>)
Adds types to the collections.
Declaration
public TBuilder Add(IEnumerable<Type> types)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Type> | types | The types to append. |
Returns
Type | Description |
---|---|
TBuilder | The builder. |
Add(Type)
Adds a type to the collection.
Declaration
public TBuilder Add(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to append. |
Returns
Type | Description |
---|---|
TBuilder | The builder. |
Add<T>()
Adds a type to the collection.
Declaration
public TBuilder Add<T>()
where T : TItem
Returns
Type | Description |
---|---|
TBuilder | The builder. |
Type Parameters
Name | Description |
---|---|
T | The type to append. |
Clear()
Clears all types in the collection.
Declaration
public TBuilder Clear()
Returns
Type | Description |
---|---|
TBuilder | The builder. |
Remove(Type)
Removes a type from the collection.
Declaration
public TBuilder Remove(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to remove. |
Returns
Type | Description |
---|---|
TBuilder | The builder. |
Remove<T>()
Removes a type from the collection.
Declaration
public TBuilder Remove<T>()
where T : TItem
Returns
Type | Description |
---|---|
TBuilder | The builder. |
Type Parameters
Name | Description |
---|---|
T | The type to remove. |
Replace(Type, Type)
Replaces a type in the collection.
Declaration
public TBuilder Replace(Type typeReplaced, Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | typeReplaced | The type to replace. |
System.Type | type | The type to insert. |
Returns
Type | Description |
---|---|
TBuilder | The builder. |
Remarks
Throws if the type to replace does not already belong to the collection.
Replace<TReplaced, T>()
Replaces a type in the collection.
Declaration
public TBuilder Replace<TReplaced, T>()
where TReplaced : TItem where T : TItem
Returns
Type | Description |
---|---|
TBuilder | The builder. |
Type Parameters
Name | Description |
---|---|
TReplaced | The type to replace. |
T | The type to insert. |
Remarks
Throws if the type to replace does not already belong to the collection.