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
TypeThe origin
target
TypeThe 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
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
TThe 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
TypeThe origin
destination
TypeThe target Type where the static method was defined
methodName
stringThe 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
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
TypeThe origin
destination
TypeThe target Type where the static property was defined
propertyName
stringvalue
objectThe property value
SetStaticPropertyOn<TContainingClass>(Type, string, object)
Generic static property setter
public static void SetStaticPropertyOn<TContainingClass>(this Type origin, string propertyName, object value)
Parameters
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
Returns
VerbName<T>(T)
The verb name of T
public static string VerbName<T>(this T cmdlet) where T : Cmdlet
Parameters
cmdlet
TThe Cmdlet
Returns
- string
Verb name
Type Parameters
T
The Cmdlet