logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class PrivateMemberInvoker

    Reflection helper for invoking non-public members under test. Lets a construction-only test suite pin a type's private SQL-building internals directly (exact CommandText and Parameters shape) without widening their visibility and without opening a real connection.

    Inheritance
    object
    PrivateMemberInvoker
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Tests.Shared
    Assembly: Tests.dll
    Syntax
    public static class PrivateMemberInvoker

    Methods

    InvokeInstanceAction(object, string, params object[])

    Invokes a void-returning private instance method by name.

    Declaration
    public static void InvokeInstanceAction(object instance, string methodName, params object[] arguments)
    Parameters
    Type Name Description
    object instance
    string methodName
    object[] arguments

    InvokeInstanceMethod<TResult>(object, string, params object[])

    Invokes a private instance method by name and returns its result.

    Declaration
    public static TResult InvokeInstanceMethod<TResult>(object instance, string methodName, params object[] arguments)
    Parameters
    Type Name Description
    object instance
    string methodName
    object[] arguments
    Returns
    Type Description
    TResult
    Type Parameters
    Name Description
    TResult

    InvokeStaticAction(Type, string, params object[])

    Invokes a void-returning private static method by name.

    Declaration
    public static void InvokeStaticAction(Type declaringType, string methodName, params object[] arguments)
    Parameters
    Type Name Description
    Type declaringType
    string methodName
    object[] arguments

    InvokeStaticMethod<TResult>(Type, string, params object[])

    Invokes a private static method by name and returns its result.

    Declaration
    public static TResult InvokeStaticMethod<TResult>(Type declaringType, string methodName, params object[] arguments)
    Parameters
    Type Name Description
    Type declaringType
    string methodName
    object[] arguments
    Returns
    Type Description
    TResult
    Type Parameters
    Name Description
    TResult
    In this article
    © 2026 Serenity. All Rights Reserved