Class TokenParser
Handles methods for token parser
Inheritance
Namespace: PnP.Framework.Provisioning.ObjectHandlers
Assembly: PnP.Framework.dll
Syntax
public class TokenParser : ICloneable
Constructors
TokenParser(Tenant, ProvisioningHierarchy)
Declaration
public TokenParser(Tenant tenant, ProvisioningHierarchy hierarchy)
Parameters
Tenant
tenant
|
ProvisioningHierarchy
hierarchy
|
TokenParser(Tenant, ProvisioningHierarchy, ProvisioningTemplateApplyingInformation)
Declaration
public TokenParser(Tenant tenant, ProvisioningHierarchy hierarchy, ProvisioningTemplateApplyingInformation applyingInformation)
Parameters
Tenant
tenant
|
ProvisioningHierarchy
hierarchy
|
ProvisioningTemplateApplyingInformation
applyingInformation
|
TokenParser(Web, ProvisioningTemplate)
Constructor
Declaration
public TokenParser(Web web, ProvisioningTemplate template)
Parameters
Web
web
A SharePoint site or subsite |
ProvisioningTemplate
template
a provisioning template |
TokenParser(Web, ProvisioningTemplate, ProvisioningTemplateApplyingInformation)
Constructor
Declaration
public TokenParser(Web web, ProvisioningTemplate template, ProvisioningTemplateApplyingInformation applyingInformation)
Parameters
Web
web
A SharePoint site or subsite |
ProvisioningTemplate
template
a provisioning template |
ProvisioningTemplateApplyingInformation
applyingInformation
The provisioning template applying information |
Properties
Tokens
List of token definitions
Declaration
public List<TokenDefinition> Tokens { get; }
Property Value
List<TokenDefinition>
|
Methods
AddToken(TokenDefinition)
adds token definition
Declaration
public void AddToken(TokenDefinition tokenDefinition)
Parameters
TokenDefinition
tokenDefinition
A TokenDefinition object |
Clone()
Clones the current TokenParser instance into a new instance
Declaration
public object Clone()
Returns
System.Object
New cloned instance of the TokenParser |
GetLeftOverTokens(String)
Gets left over tokens
Declaration
public IEnumerable<string> GetLeftOverTokens(string input)
Parameters
System.String
input
input string |
Returns
IEnumerable<System.String>
Returns collections of left over tokens |
GetResourceTokenResourceValues(String)
Gets list of token resource values
Declaration
public List<Tuple<string, string>> GetResourceTokenResourceValues(string tokenValue)
Parameters
System.String
tokenValue
Token value |
Returns
List<Tuple<System.String, System.String>>
Returns list of token resource values |
ParseString(String)
Parses the string
Declaration
public string ParseString(string input)
Parameters
System.String
input
input string to parse |
Returns
System.String
Returns parsed string |
ParseString(String, String[])
Parses given string
Declaration
public string ParseString(string input, params string[] tokensToSkip)
Parameters
System.String
input
input string |
System.String[]
tokensToSkip
array of tokens to skip |
Returns
System.String
Returns parsed string |
ParseStringWebPart(String, Web, String[])
Parses given string for a webpart making sure we only parse the token for a given web
Declaration
public string ParseStringWebPart(string input, Web web, params string[] tokensToSkip)
Parameters
System.String
input
input string |
Web
web
filters the tokens on web id |
System.String[]
tokensToSkip
array of tokens to skip |
Returns
System.String
Returns parsed string for a webpart |
ParseXmlString(String, String[])
Declaration
public string ParseXmlString(string inputXml, params string[] tokensToSkip)
Parameters
System.String
inputXml
|
System.String[]
tokensToSkip
|
Returns
System.String
|
ParseXmlStringWebpart(String, Web, String[])
Declaration
public string ParseXmlStringWebpart(string inputXml, Web web, params string[] tokensToSkip)
Parameters
System.String
inputXml
|
Web
web
|
System.String[]
tokensToSkip
|
Returns
System.String
|
Rebase(Web)
Declaration
public void Rebase(Web web)
Parameters
Web
web
|
Rebase(Web, ProvisioningTemplate, ProvisioningTemplateApplyingInformation)
Declaration
public void Rebase(Web web, ProvisioningTemplate template, ProvisioningTemplateApplyingInformation applyingInformation = null)
Parameters
Web
web
|
ProvisioningTemplate
template
|
ProvisioningTemplateApplyingInformation
applyingInformation
|