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
List page ListItem |
File
pageFile
page File |
Page page transformation model to use for extraction or transformation |
IList<ILog
|
Fields
cc
Declaration
public ClientContext cc
Field Value
Client
|
page
Declaration
public ListItem page
Field Value
List
|
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. Web part xml to analyze |
Returns
System. 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. Web part properties to analyze |
System. If true tries additional webpart types used in legacy versions |
Returns
System. 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. Properties collection retrieved when we loaded the web part |
System. Type of the web part |
System. Web part XML |
Returns
Dictionary<System. Collection of the requested property/value pairs |