Search Results for

    Show / Hide Table of Contents

    Class MarkdownObserver

    Markdown observer intended for end-user output

    Inheritance
    System.Object
    MarkdownObserver
    MarkdownToSharePointObserver
    Namespace: PnP.Framework.Modernization.Telemetry.Observers
    Assembly: PnP.Framework.dll
    Syntax
    public class MarkdownObserver : object, ILogObserver

    Constructors

    MarkdownObserver(String, String, Boolean, Boolean)

    Constructor for specifying to include debug entries

    Declaration
    public MarkdownObserver(string fileName = "", string folder = "", bool includeDebugEntries = false, bool includeVerbose = false)
    Parameters
    System.String fileName

    Name used to construct the log file name

    System.String folder

    Folder that will hold the log file

    System.Boolean includeDebugEntries

    Include Debug Log Entries

    System.Boolean includeVerbose

    Include verbose details

    Fields

    _includeDebugEntries

    Declaration
    protected bool _includeDebugEntries
    Field Value
    System.Boolean

    _includeVerbose

    Declaration
    protected bool _includeVerbose
    Field Value
    System.Boolean

    _pageBeingTransformed

    Declaration
    protected string _pageBeingTransformed
    Field Value
    System.String

    _reportDate

    Declaration
    protected DateTime _reportDate
    Field Value
    DateTime

    _reportFileName

    Declaration
    protected string _reportFileName
    Field Value
    System.String

    _reportFolder

    Declaration
    protected string _reportFolder
    Field Value
    System.String

    Properties

    Logs

    Get the single List<LogEntry> instance, singleton pattern

    Declaration
    public static List<Tuple<LogLevel, LogEntry>> Logs { get; }
    Property Value
    List<Tuple<LogLevel, LogEntry>>

    Methods

    Debug(LogEntry)

    Debug level of data not recorded unless in debug mode

    Declaration
    public void Debug(LogEntry entry)
    Parameters
    LogEntry entry

    Implements
    ILogObserver.Debug(LogEntry)

    Error(LogEntry)

    Errors

    Declaration
    public void Error(LogEntry entry)
    Parameters
    LogEntry entry

    Implements
    ILogObserver.Error(LogEntry)

    Flush()

    Output the report when flush is called

    Declaration
    public virtual void Flush()
    Implements
    ILogObserver.Flush()

    Flush(Boolean)

    Output the report when flush is called

    Declaration
    public virtual void Flush(bool clearLogData)
    Parameters
    System.Boolean clearLogData

    Also clear the log data

    Implements
    ILogObserver.Flush(Boolean)

    GenerateReportWithSummaryAtTop(Boolean)

    Generates a markdown based report based on the logs

    Declaration
    protected virtual string GenerateReportWithSummaryAtTop(bool includeHeading = true)
    Parameters
    System.Boolean includeHeading

    Returns
    System.String

    GenerateReportWithSummaryAtTopDetails(StringBuilder, IEnumerable<Tuple<LogLevel, LogEntry>>)

    Declaration
    protected virtual string GenerateReportWithSummaryAtTopDetails(StringBuilder report, IEnumerable<Tuple<LogLevel, LogEntry>> distinctLogs)
    Parameters
    StringBuilder report

    IEnumerable<Tuple<LogLevel, LogEntry>> distinctLogs

    Returns
    System.String

    Info(LogEntry)

    Reporting operations throughout the transform process

    Declaration
    public void Info(LogEntry entry)
    Parameters
    LogEntry entry

    Implements
    ILogObserver.Info(LogEntry)

    SetPageId(String)

    Sets the id of the page that's being transformed

    Declaration
    public void SetPageId(string pageId)
    Parameters
    System.String pageId

    Id of the page

    Implements
    ILogObserver.SetPageId(String)

    Warning(LogEntry)

    Report on any warnings generated by the reporting tool

    Declaration
    public void Warning(LogEntry entry)
    Parameters
    LogEntry entry

    Implements
    ILogObserver.Warning(LogEntry)

    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