Class BasePage
Base class for the page analyzers
Inherited Members
Namespace: PnP.Framework.Modernization.Pages
Assembly: PnP.Framework.dll
Syntax
public abstract class BasePage : BaseTransform
Constructors
BasePage(ListItem, File, PageTransformation, IList<ILogObserver>)
Constructs the base page class instance
Declaration
public BasePage(ListItem page, File pageFile, PageTransformation pageTransformation, IList<ILogObserver> logObservers = null)
Parameters
ListItem
page
page ListItem |
File
pageFile
page File |
PageTransformation
pageTransformation
page transformation model to use for extraction or transformation |
IList<ILogObserver>
logObservers
|
Fields
cc
Declaration
public ClientContext cc
Field Value
ClientContext
|
page
Declaration
public ListItem page
Field Value
ListItem
|
pageFile
Declaration
public File pageFile
Field Value
File
|
pageTransformation
Methods
GetType(String)
Gets the type of the web part
Declaration
public string GetType(string webPartXml)
Parameters
System.String
webPartXml
Web part xml to analyze |
Returns
System.String
Type of the web part as fully qualified name |
GetTypeFromProperties(Dictionary<String, Object>, Boolean)
Gets the type of the web part by detecting it from the available properties
Declaration
public string GetTypeFromProperties(Dictionary<string, object> properties, bool isLegacy = false)
Parameters
Dictionary<System.String, System.Object>
properties
Web part properties to analyze |
System.Boolean
isLegacy
If true tries additional webpart types used in legacy versions |
Returns
System.String
Type of the web part as fully qualified name |
Properties(Dictionary<String, Object>, String, String)
Checks the PageTransformation XML data to know which properties need to be kept for the given web part and collects their values
Declaration
public Dictionary<string, string> Properties(Dictionary<string, object> properties, string webPartType, string webPartXml)
Parameters
Dictionary<System.String, System.Object>
properties
Properties collection retrieved when we loaded the web part |
System.String
webPartType
Type of the web part |
System.String
webPartXml
Web part XML |
Returns
Dictionary<System.String, System.String>
Collection of the requested property/value pairs |