Search Results for

    Show / Hide Table of Contents

    Class TokenDefinition

    Defines a provisioning engine Token. Make sure to only use the TokenContext property to execute queries in token methods.

    Inheritance
    System.Object
    TokenDefinition
    DateNowToken
    FqdnToken
    HostUrlToken
    VolatileTokenDefinition
    Namespace: PnP.Framework.Provisioning.ObjectHandlers.TokenDefinitions
    Assembly: PnP.Framework.dll
    Syntax
    public abstract class TokenDefinition : object

    Constructors

    TokenDefinition(Web, String[])

    Constructor

    Declaration
    public TokenDefinition(Web web, params string[] token)
    Parameters
    Web web

    Current site/subsite

    System.String[] token

    token

    Fields

    CacheValue

    Declaration
    protected string CacheValue
    Field Value
    System.String

    Properties

    IsCacheable

    Defines if a token is cacheable and should be added to the token cache during initialization of the token parser. This means that the value for a token will be returned from the cache instead from the GetReplaceValue during the provisioning run. Defaults to true.

    Declaration
    public bool IsCacheable { get; set; }
    Property Value
    System.Boolean

    TokenContext

    Returns a cloned context which is separate from the current context, not affecting ongoing queries.

    Declaration
    public ClientContext TokenContext { get; }
    Property Value
    ClientContext

    TokenCount

    Gets the amount of tokens hold by this token definition

    Declaration
    public int TokenCount { get; }
    Property Value
    System.Int32

    Web

    Web is a SiteCollection or SubSite

    Declaration
    public Web Web { get; set; }
    Property Value
    Web

    Methods

    ClearCache()

    Clears cache

    Declaration
    public void ClearCache()

    GetRegex()

    Gets array of regular expressions

    Declaration
    public Regex[] GetRegex()
    Returns
    Regex[]

    Returns all Regular Expressions

    GetRegexForToken(String)

    Gets regular expression for the given token

    Declaration
    public Regex GetRegexForToken(string token)
    Parameters
    System.String token

    token string

    Returns
    Regex

    Returns RegularExpression

    GetReplaceValue()

    abstract method

    Declaration
    public abstract string GetReplaceValue()
    Returns
    System.String

    Returns string

    GetTokenLength()

    Gets the length of the largest token

    Declaration
    public int GetTokenLength()
    Returns
    System.Int32

    Length of the largest token

    GetTokens()

    Gets tokens

    Declaration
    public string[] GetTokens()
    Returns
    System.String[]

    Returns array string of tokens

    GetUnescapedTokens()

    Gets the by processed tokens

    Declaration
    public IReadOnlyList<string> GetUnescapedTokens()
    Returns
    IReadOnlyList<System.String>

    Returns array string of by processed tokens

    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