Class BaseTransform
Base logging implementation
Inheritance
Namespace: PnP.Framework.Modernization.Transform
Assembly: PnP.Framework.dll
Syntax
public class BaseTransform : object
Constructors
BaseTransform()
Instantiation of base transform class
Declaration
public BaseTransform()
Properties
RegisteredLogObservers
List of registered log observers
Declaration
public IList<ILogObserver> RegisteredLogObservers { get; }
Property Value
IList<ILogObserver>
|
Methods
FlushObservers()
Flush all log observers
Declaration
public void FlushObservers()
FlushSpecificObserver<T>()
Flush Specific Observer of a type
Declaration
public void FlushSpecificObserver<T>()
Type Parameters
T
|
GetExactVersion(ClientRuntimeContext)
Gets exact version of SharePoint
Declaration
public static string GetExactVersion(ClientRuntimeContext clientContext)
Parameters
ClientRuntimeContext
clientContext
|
Returns
System.String
|
GetVersion(ClientRuntimeContext)
Gets the version of SharePoint
Declaration
public static SPVersion GetVersion(ClientRuntimeContext clientContext)
Parameters
ClientRuntimeContext
clientContext
|
Returns
SPVersion
|
Log(LogEntry, LogLevel)
Log entries into the observers
Declaration
public void Log(LogEntry entry, LogLevel level)
Parameters
LogEntry
entry
|
LogLevel
level
|
LogDebug(String, String)
Notifies the observers of debug messages
Declaration
public void LogDebug(string message, string heading = "")
Parameters
System.String
message
The message. |
System.String
heading
The logical grouping for the messages based on the stage of transformation |
LogError(String, String, Exception, Boolean, Boolean)
Notifies the observers of error messages
Declaration
public void LogError(string message, string heading = "", Exception exception = null, bool ignoreException = false, bool isCriticalException = false)
Parameters
System.String
message
The message. |
System.String
heading
The logical grouping for the messages based on the stage of transformation |
Exception
exception
Exception object |
System.Boolean
ignoreException
For those areas where we swallow errors or they are non-critical to report |
System.Boolean
isCriticalException
Marks this error as a critical exception that prevents transformation |
LogInfo(String, String, LogEntrySignificance)
Notifies the observers of info messages
Declaration
public void LogInfo(string message, string heading = "", LogEntrySignificance significance = LogEntrySignificance.None)
Parameters
System.String
message
The message. |
System.String
heading
The logical grouping for the messages based on the stage of transformation |
LogEntrySignificance
significance
Extra significance of the entry for the logs |
LogWarning(String, String)
Notifies the observers of warning messages
Declaration
public void LogWarning(string message, string heading = "")
Parameters
System.String
message
The message. |
System.String
heading
The logical grouping for the messages based on the stage of transformation |
RegisterObserver(ILogObserver)
Registers the observer
Declaration
public void RegisterObserver(ILogObserver observer)
Parameters
ILogObserver
observer
The observer. |
SetPageId(String)
Sets the page name of the page being transformed
Declaration
public void SetPageId(string pageId)
Parameters
System.String
pageId
Name of the page being transformed |