Search Results for

    Show / Hide Table of Contents

    Class ReflectionHelper

    Inheritance
    System.Object
    ReflectionHelper
    Namespace: OpenAPI.Utils
    Assembly: OpenAPI.dll
    Syntax
    public static class ReflectionHelper : object

    Methods

    | Improve this Doc View Source

    GetPrivateFieldValue<T>(Type, Object, String)

    Returns a private Property Value from a given Object. Uses Reflection. Throws a ArgumentOutOfRangeException if the Property is not found.

    Declaration
    public static T GetPrivateFieldValue<T>(Type t, object obj, string propName)
    Parameters
    Type Name Description
    Type t
    System.Object obj

    Object from where the Property Value is returned

    System.String propName

    Propertyname as string.

    Returns
    Type Description
    T

    PropertyValue

    Type Parameters
    Name Description
    T

    Type of the Property

    | Improve this Doc View Source

    GetPrivatePropertyValue<T>(Type, Object, String)

    Returns a private Property Value from a given Object. Uses Reflection. Throws a ArgumentOutOfRangeException if the Property is not found.

    Declaration
    public static T GetPrivatePropertyValue<T>(Type t, object obj, string propName)
    Parameters
    Type Name Description
    Type t
    System.Object obj

    Object from where the Property Value is returned

    System.String propName

    Propertyname as string.

    Returns
    Type Description
    T

    PropertyValue

    Type Parameters
    Name Description
    T

    Type of the Property

    | Improve this Doc View Source

    GetPrivateStaticPropertyValue<T>(Type, String)

    Declaration
    public static T GetPrivateStaticPropertyValue<T>(Type t, string propName)
    Parameters
    Type Name Description
    Type t
    System.String propName
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    InvokePrivateMethod(Type, Object, String, Object[])

    Declaration
    public static object InvokePrivateMethod(Type type, object obj, string method, object[] parameters)
    Parameters
    Type Name Description
    Type type
    System.Object obj
    System.String method
    System.Object[] parameters
    Returns
    Type Description
    System.Object
    | Improve this Doc View Source

    SetPrivateFieldValue<T>(Type, Object, String, T)

    Set a private Property Value on a given Object. Uses Reflection.

    Declaration
    public static void SetPrivateFieldValue<T>(Type t, object obj, string propName, T val)
    Parameters
    Type Name Description
    Type t
    System.Object obj

    Object from where the Property Value is returned

    System.String propName

    Propertyname as string.

    T val

    the value to set

    Type Parameters
    Name Description
    T

    Type of the Property

    | Improve this Doc View Source

    SetPrivatePropertyValue<T>(Type, Object, String, T)

    Sets a private Property Value from a given Object. Uses Reflection. Throws a ArgumentOutOfRangeException if the Property is not found.

    Declaration
    public static void SetPrivatePropertyValue<T>(Type t, object obj, string propName, T val)
    Parameters
    Type Name Description
    Type t
    System.Object obj

    Object from where the Property Value is set

    System.String propName

    Propertyname as string.

    T val

    Value to set.

    Type Parameters
    Name Description
    T

    Type of the Property

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX