Search Results for

    Show / Hide Table of Contents

    Class ProcessMonitor

    Inheritance
    object
    ProcessMonitor
    Implements
    IProcessMonitor
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Utils
    Assembly: LemonEdge.Utils.dll
    Syntax
    public class ProcessMonitor : IProcessMonitor

    Constructors

    ProcessMonitor(ILogger, EventId)

    PRIVATE. Use Create(ILogger, EventId) instead.

    Declaration
    public ProcessMonitor(ILogger logger, EventId eventIdForAllSteps)
    Parameters
    Type Name Description
    ILogger logger

    An ILogger from the consumer.

    EventId eventIdForAllSteps

    An EventId to use in logging. If provided, this is used across all the steps.

    Properties

    Child

    Creates a child ProcessMonitor, with the same ILogger and EventId.

    Declaration
    public IProcessMonitor Child { get; }
    Property Value
    Type Description
    IProcessMonitor

    Methods

    ProcessAsync<T>(string, Func<Task<T>>)

    Logs that a unit of code is starting. Runs that named unit of code (process). Logs that the unit of code finished, and its duration. See the ProcessMonitor class declaration for usage example.

    Declaration
    public Task<T> ProcessAsync<T>(string name, Func<Task<T>> process)
    Parameters
    Type Name Description
    string name

    The name / label to give the process.

    Func<Task<T>> process

    The process itself.

    Returns
    Type Description
    Task<T>

    A task of type T.

    Type Parameters
    Name Description
    T

    The type of the process.

    Implements

    IProcessMonitor

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.