Search Results for

    Show / Hide Table of Contents

    Class BaseProvisioningHierarchyObjectCollection<T>

    Collection of Provisioning Hierarchy children

    Inheritance
    System.Object
    BaseProvisioningHierarchyObjectCollection<T>
    ProvisioningSequenceCollection
    ProvisioningTemplateCollection
    SiteCollectionCollection
    SubSiteCollection
    Namespace: PnP.Framework.Provisioning.Model
    Assembly: PnP.Framework.dll
    Syntax
    public abstract class BaseProvisioningHierarchyObjectCollection<T> : Collection<T>, IProvisioningHierarchyDescendant where T : BaseHierarchyModel
    Type Parameters
    T

    The type of Item for the collection

    Constructors

    BaseProvisioningHierarchyObjectCollection(ProvisioningHierarchy)

    Custom constructor to manage the ParentTemplate for the collection and all the children of the collection

    Declaration
    public BaseProvisioningHierarchyObjectCollection(ProvisioningHierarchy parentHierarchy)
    Parameters
    ProvisioningHierarchy parentHierarchy

    Parent provisioning template

    Properties

    ParentHierarchy

    References the parent ProvisioningTemplate for the current provisioning artifact

    Declaration
    public virtual ProvisioningHierarchy ParentHierarchy { get; }
    Property Value
    ProvisioningHierarchy

    Implements
    IProvisioningHierarchyDescendant.ParentHierarchy

    Methods

    AddRange(IEnumerable<T>)

    Adds item to the collection

    Declaration
    public virtual void AddRange(IEnumerable<T> collection)
    Parameters
    IEnumerable<T> collection

    IEnumerable type object

    ClearItems()

    Declaration
    protected override void ClearItems()

    Find(Predicate<T>)

    Finds an item matching a search predicate

    Declaration
    public T Find(Predicate<T> match)
    Parameters
    Predicate<T> match

    The matching predicate to use for finding any target item

    Returns
    T

    The target item matching the find predicate

    Remarks

    We implemented this to adhere to the generic List of T behavior

    FindIndex(Predicate<T>)

    Finds index of the item matching the search predicate

    Declaration
    public Int32 FindIndex(Predicate<T> match)
    Parameters
    Predicate<T> match

    The matching predicate to use for finding any target item

    Returns
    Int32

    Returns matching index

    FindIndex(Int32, Predicate<T>)

    Finds index of the item matching the search predicate based on start index provided.

    Declaration
    public int FindIndex(int startIndex, Predicate<T> match)
    Parameters
    System.Int32 startIndex

    Starting index

    Predicate<T> match

    The matching predicate to use for finding any target item

    Returns
    System.Int32

    Returns matching index

    FindIndex(Int32, Int32, Predicate<T>)

    Finds index of the item matching the search predicate based on start index and count.

    Declaration
    public int FindIndex(int startIndex, int count, Predicate<T> match)
    Parameters
    System.Int32 startIndex

    Starting index

    System.Int32 count

    Index Count

    Predicate<T> match

    The matching predicate to use for finding any target item

    Returns
    System.Int32

    Returns matching index

    InsertItem(Int32, T)

    Declaration
    protected override void InsertItem(int index, T item)
    Parameters
    System.Int32 index

    T item

    RemoveAll(Predicate<T>)

    Removes all the matching indexes

    Declaration
    public int RemoveAll(Predicate<T> match)
    Parameters
    Predicate<T> match

    The matching predicate to use for removing target item

    Returns
    System.Int32

    Returns count of the matches after removing

    RemoveItem(Int32)

    Declaration
    protected override void RemoveItem(int index)
    Parameters
    System.Int32 index

    SetItem(Int32, T)

    Declaration
    protected override void SetItem(int index, T item)
    Parameters
    System.Int32 index

    T item

    Extension Methods

    ValidationExtensions.ValidateNotNullOrEmpty<T>(T, String)
    ObjectExtensions.Set<TObject, T>(TObject, Expression<Func<TObject, T>>, T, Boolean, Boolean)
    ObjectExtensions.GetPublicInstancePropertyValue(Object, String)
    ObjectExtensions.GetPublicInstanceProperty(Object, String)
    ObjectExtensions.SetPublicInstancePropertyValue(Object, String, Object)
    Extensions.ToByteArray(Object)
    Back to top PnP Framework
    Generated by DocFX with Material UI
    spacer