FastMoq
Search Results for

    Show / Hide Table of Contents

    Class MockingProviderRegistry

    Global registry for available mocking providers with support for scoped overrides.

    Inheritance
    object
    MockingProviderRegistry
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: FastMoq.Providers
    Assembly: FastMoq.Core.dll
    Syntax
    public static class MockingProviderRegistry

    Properties

    Default

    Declaration
    public static IMockingProvider Default { get; }
    Property Value
    Type Description
    IMockingProvider

    RegisteredProviderNames

    Declaration
    public static IReadOnlyCollection<string> RegisteredProviderNames { get; }
    Property Value
    Type Description
    IReadOnlyCollection<string>

    Methods

    Clear()

    Declaration
    public static void Clear()

    Push(IMockingProvider)

    Push a provider for the current async context returning a disposable that restores the previous value.

    Declaration
    public static IDisposable Push(IMockingProvider provider)
    Parameters
    Type Name Description
    IMockingProvider provider
    Returns
    Type Description
    IDisposable

    Push(string)

    Declaration
    public static IDisposable Push(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    IDisposable

    Register(string, IMockingProvider, bool)

    Declaration
    public static void Register(string name, IMockingProvider provider, bool setAsDefault = false)
    Parameters
    Type Name Description
    string name
    IMockingProvider provider
    bool setAsDefault

    SetDefault(string)

    Declaration
    public static void SetDefault(string name)
    Parameters
    Type Name Description
    string name

    TryGet(string, out IMockingProvider)

    Declaration
    public static bool TryGet(string name, out IMockingProvider provider)
    Parameters
    Type Name Description
    string name
    IMockingProvider provider
    Returns
    Type Description
    bool

    WrapLegacy(object, Type)

    Declaration
    public static IFastMock WrapLegacy(object legacyMock, Type mockedType)
    Parameters
    Type Name Description
    object legacyMock
    Type mockedType
    Returns
    Type Description
    IFastMock
    In this article
    Back to top
    Generated 2026-04-08 00:16 UTC