Table of Contents

Class JNetPSHelperExtensions

Namespace
MASES.JNetPSCore
Assembly
MASES.JNetPSCore.dll

Public extension class

public static class JNetPSHelperExtensions
Inheritance
JNetPSHelperExtensions
Inherited Members

Methods

GetStaticPropertyOn(Type, Type, string)

Generic static property getter

public static object GetStaticPropertyOn(this Type origin, Type target, string propertyName)

Parameters

origin Type

The origin

target Type

The target Type where the static property was defined

propertyName string

Returns

object

The property value

GetStaticPropertyOn<TContainingClass>(Type, string)

Generic static property getter

public static object GetStaticPropertyOn<TContainingClass>(this Type origin, string propertyName)

Parameters

origin Type

The origin

propertyName string

Returns

object

The property value

Type Parameters

TContainingClass

The target Type where the static property was defined

NounName<T>(T)

The noun name of T

public static string NounName<T>(this T cmdlet) where T : Cmdlet

Parameters

cmdlet T

The Cmdlet

Returns

string

Noun name

Type Parameters

T

The Cmdlet

RunStaticMethodOn(Type, Type, string, params object[])

Executes a static method defined in destination

public static object RunStaticMethodOn(this Type origin, Type destination, string methodName, params object[] args)

Parameters

origin Type

The origin

destination Type

The target Type where the static method was defined

methodName string

The method name

args object[]

The method arguments

Returns

object

The method result

RunStaticMethodOn<TContainingClass>(Type, string, params object[])

Executes a static method defined in destination

public static object RunStaticMethodOn<TContainingClass>(this Type source, string methodName, params object[] args)

Parameters

source Type
methodName string

The method name

args object[]

The method arguments

Returns

object

The method result

Type Parameters

TContainingClass

The target Type where the static method was defined

SetStaticPropertyOn(Type, Type, string, object)

Generic static property setter

public static void SetStaticPropertyOn(this Type origin, Type destination, string propertyName, object value)

Parameters

origin Type

The origin

destination Type

The target Type where the static property was defined

propertyName string
value object

The property value

SetStaticPropertyOn<TContainingClass>(Type, string, object)

Generic static property setter

public static void SetStaticPropertyOn<TContainingClass>(this Type origin, string propertyName, object value)

Parameters

origin Type

The origin

propertyName string
value object

The property value

Type Parameters

TContainingClass

The target Type where the static property was defined

TraverseUntil(Type, Type)

Traverse the class chain from source until t

public static Type TraverseUntil(this Type source, Type t)

Parameters

source Type

The source

t Type

The target

Returns

Type

The Type found

VerbName<T>(T)

The verb name of T

public static string VerbName<T>(this T cmdlet) where T : Cmdlet

Parameters

cmdlet T

The Cmdlet

Returns

string

Verb name

Type Parameters

T

The Cmdlet