Search Results for

    Show / Hide Table of Contents
    View Source

    Class WeightedCollectionBuilderBase<TBuilder, TCollection, TItem>

    Implements a weighted collection builder.

    Inheritance
    System.Object
    CollectionBuilderBase<TBuilder, TCollection, TItem>
    Namespace: Umbraco.Cms.Core.Composing
    Assembly: Umbraco.Core.dll
    Syntax
    public abstract class WeightedCollectionBuilderBase<TBuilder, TCollection, TItem> : CollectionBuilderBase<TBuilder, TCollection, TItem>, ICollectionBuilder<TCollection, TItem>, ICollectionBuilder where TBuilder : WeightedCollectionBuilderBase<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.

    Properties

    View Source

    DefaultWeight

    Declaration
    public virtual int DefaultWeight { get; set; }
    Property Value
    Type Description
    System.Int32
    View Source

    This

    Declaration
    protected abstract TBuilder This { get; }
    Property Value
    Type Description
    TBuilder

    Methods

    View Source

    Add(IEnumerable<Type>)

    Adds types to the collection.

    Declaration
    public TBuilder Add(IEnumerable<Type> types)
    Parameters
    Type Name Description
    IEnumerable<Type> types

    The types to add.

    Returns
    Type Description
    TBuilder

    The builder.

    View Source

    Add(Type)

    Adds a type to the collection.

    Declaration
    public TBuilder Add(Type type)
    Parameters
    Type Name Description
    Type type

    The type to add.

    Returns
    Type Description
    TBuilder

    The builder.

    View Source

    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 add.

    View Source

    Clear()

    Clears all types in the collection.

    Declaration
    public TBuilder Clear()
    Returns
    Type Description
    TBuilder

    The builder.

    View Source

    GetRegisteringTypes(IEnumerable<Type>)

    Declaration
    protected override IEnumerable<Type> GetRegisteringTypes(IEnumerable<Type> types)
    Parameters
    Type Name Description
    IEnumerable<Type> types
    Returns
    Type Description
    IEnumerable<Type>
    View Source

    GetWeight(Type)

    Declaration
    protected virtual int GetWeight(Type type)
    Parameters
    Type Name Description
    Type type
    Returns
    Type Description
    System.Int32
    View Source

    Remove(Type)

    Removes a type from the collection.

    Declaration
    public TBuilder Remove(Type type)
    Parameters
    Type Name Description
    Type type

    The type to remove.

    Returns
    Type Description
    TBuilder

    The builder.

    View Source

    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.

    View Source

    SetWeight<T>(Int32)

    Changes the default weight of an item

    Declaration
    public TBuilder SetWeight<T>(int weight)
        where T : TItem
    Parameters
    Type Name Description
    System.Int32 weight

    The new weight

    Returns
    Type Description
    TBuilder
    Type Parameters
    Name Description
    T

    The type of item

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX