Search Results for

    Show / Hide Table of Contents

    Class ReflectionHelper

    A set of helpers to simplify some reflection tasks.

    Inheritance
    Object
    ReflectionHelper
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: BionicCode.Utilities.Net
    Assembly: BionicCode.Utilities.Net.Common.dll
    Syntax
    public static class ReflectionHelper

    Methods

    | Improve this Doc View Source

    GetCurrentFilePath(String)

    A convenient helper to return the file path of the source file that contains the current caller context without the need to decorate the member with the CallerFilePathAttribute attribute.

    Declaration
    public static string GetCurrentFilePath(string callerFilePath = null)
    Parameters
    Type Name Description
    String callerFilePath

    The file path (optional and not required).

    Returns
    Type Description
    String

    The file path of the source file that contains the current context.

    Remarks

    Passing a callerFilePath argument is not required as thie value is actually retrieved via refelection.

    | Improve this Doc View Source

    GetCurrentLineNumber(Int32)

    A convenient helper to return the line number of the caller at which the current context was called without the need to decorate the member with the CallerLineNumberAttribute attribute.

    Declaration
    public static int GetCurrentLineNumber(int callerLineNumber = 0)
    Parameters
    Type Name Description
    Int32 callerLineNumber

    The line number (optional and not required).

    Returns
    Type Description
    Int32

    The line number of the caller at which the current context was called.

    Remarks

    Passing a callerLineNumber argument is not required as thie value is actually retrieved via refelection.

    | Improve this Doc View Source

    GetCurrentMemberName(String)

    A convenient helper to return the member name of the current context without the need to decorate the member with the CallerMemberNameAttribute attribute.

    Declaration
    public static string GetCurrentMemberName(string callerMemberName = null)
    Parameters
    Type Name Description
    String callerMemberName

    The member name (optional and not required).

    Returns
    Type Description
    String

    The member name of the current context.

    Remarks

    Passing a callerMemberName argument is not required as thie value is actually retrieved via refelection.

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