Version 3.0.1.0

EmitUtilities class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public static class EmitUtilities
Inheritance
  • System.Object
  • EmitUtilities

Properties

CanEmit
public static bool CanEmit { get; }

Methods

CreateInstanceFieldGetter<InstanceType, FieldType>(FieldInfo)
public static ValueGetter<InstanceType, FieldType> CreateInstanceFieldGetter<InstanceType, FieldType>(FieldInfo fieldInfo)
Parameters
System.Reflection.FieldInfo fieldInfo

Returns
Sirenix.Utilities.ValueGetter<InstanceType, FieldType>

Type Parameters
InstanceType

FieldType

CreateInstanceFieldSetter<InstanceType, FieldType>(FieldInfo)
public static ValueSetter<InstanceType, FieldType> CreateInstanceFieldSetter<InstanceType, FieldType>(FieldInfo fieldInfo)
Parameters
System.Reflection.FieldInfo fieldInfo

Returns
Sirenix.Utilities.ValueSetter<InstanceType, FieldType>

Type Parameters
InstanceType

FieldType

CreateInstanceMethodCaller<InstanceType>(MethodInfo)
public static Action<InstanceType> CreateInstanceMethodCaller<InstanceType>(MethodInfo methodInfo)
Parameters
System.Reflection.MethodInfo methodInfo

Returns
System.Action<InstanceType>

Type Parameters
InstanceType

CreateInstanceMethodCaller<InstanceType, Arg1>(MethodInfo)
public static Action<InstanceType, Arg1> CreateInstanceMethodCaller<InstanceType, Arg1>(MethodInfo methodInfo)
Parameters
System.Reflection.MethodInfo methodInfo

Returns
System.Action<InstanceType, Arg1>

Type Parameters
InstanceType

Arg1

CreateInstancePropertyGetter<InstanceType, PropType>(PropertyInfo)
public static ValueGetter<InstanceType, PropType> CreateInstancePropertyGetter<InstanceType, PropType>(PropertyInfo propertyInfo)
Parameters
System.Reflection.PropertyInfo propertyInfo

Returns
Sirenix.Utilities.ValueGetter<InstanceType, PropType>

Type Parameters
InstanceType

PropType

CreateInstancePropertySetter<InstanceType, PropType>(PropertyInfo)
public static ValueSetter<InstanceType, PropType> CreateInstancePropertySetter<InstanceType, PropType>(PropertyInfo propertyInfo)
Parameters
System.Reflection.PropertyInfo propertyInfo

Returns
Sirenix.Utilities.ValueSetter<InstanceType, PropType>

Type Parameters
InstanceType

PropType

CreateMethodReturner<InstanceType, ReturnType>(MethodInfo)
public static Func<InstanceType, ReturnType> CreateMethodReturner<InstanceType, ReturnType>(MethodInfo methodInfo)
Parameters
System.Reflection.MethodInfo methodInfo

Returns
System.Func<InstanceType, ReturnType>

Type Parameters
InstanceType

ReturnType

CreateStaticFieldGetter<FieldType>(FieldInfo)
public static Func<FieldType> CreateStaticFieldGetter<FieldType>(FieldInfo fieldInfo)
Parameters
System.Reflection.FieldInfo fieldInfo

Returns
System.Func<FieldType>

Type Parameters
FieldType

CreateStaticFieldSetter<FieldType>(FieldInfo)
public static Action<FieldType> CreateStaticFieldSetter<FieldType>(FieldInfo fieldInfo)
Parameters
System.Reflection.FieldInfo fieldInfo

Returns
System.Action<FieldType>

Type Parameters
FieldType

CreateStaticMethodCaller(MethodInfo)
public static Action CreateStaticMethodCaller(MethodInfo methodInfo)
Parameters
System.Reflection.MethodInfo methodInfo

Returns
System.Action

CreateStaticPropertyGetter<PropType>(PropertyInfo)
public static Func<PropType> CreateStaticPropertyGetter<PropType>(PropertyInfo propertyInfo)
Parameters
System.Reflection.PropertyInfo propertyInfo

Returns
System.Func<PropType>

Type Parameters
PropType

CreateStaticPropertySetter<PropType>(PropertyInfo)
public static Action<PropType> CreateStaticPropertySetter<PropType>(PropertyInfo propertyInfo)
Parameters
System.Reflection.PropertyInfo propertyInfo

Returns
System.Action<PropType>

Type Parameters
PropType

CreateWeakInstanceFieldGetter(Type, FieldInfo)
public static WeakValueGetter CreateWeakInstanceFieldGetter(Type instanceType, FieldInfo fieldInfo)
Parameters
System.Type instanceType

System.Reflection.FieldInfo fieldInfo

Returns
Sirenix.Utilities.WeakValueGetter

CreateWeakInstanceFieldGetter<FieldType>(Type, FieldInfo)
public static WeakValueGetter<FieldType> CreateWeakInstanceFieldGetter<FieldType>(Type instanceType, FieldInfo fieldInfo)
Parameters
System.Type instanceType

System.Reflection.FieldInfo fieldInfo

Returns
Sirenix.Utilities.WeakValueGetter<FieldType>

Type Parameters
FieldType

CreateWeakInstanceFieldSetter(Type, FieldInfo)
public static WeakValueSetter CreateWeakInstanceFieldSetter(Type instanceType, FieldInfo fieldInfo)
Parameters
System.Type instanceType

System.Reflection.FieldInfo fieldInfo

Returns
Sirenix.Utilities.WeakValueSetter

CreateWeakInstanceFieldSetter<FieldType>(Type, FieldInfo)
public static WeakValueSetter<FieldType> CreateWeakInstanceFieldSetter<FieldType>(Type instanceType, FieldInfo fieldInfo)
Parameters
System.Type instanceType

System.Reflection.FieldInfo fieldInfo

Returns
Sirenix.Utilities.WeakValueSetter<FieldType>

Type Parameters
FieldType

CreateWeakInstanceMethodCaller(MethodInfo)
public static Action<object> CreateWeakInstanceMethodCaller(MethodInfo methodInfo)
Parameters
System.Reflection.MethodInfo methodInfo

Returns
System.Action<System.Object>

CreateWeakInstanceMethodCaller<TArg1>(MethodInfo)
public static Action<object, TArg1> CreateWeakInstanceMethodCaller<TArg1>(MethodInfo methodInfo)
Parameters
System.Reflection.MethodInfo methodInfo

Returns
System.Action<System.Object, TArg1>

Type Parameters
TArg1

CreateWeakInstanceMethodCaller<TResult, TArg1>(MethodInfo)
public static Func<object, TArg1, TResult> CreateWeakInstanceMethodCaller<TResult, TArg1>(MethodInfo methodInfo)
Parameters
System.Reflection.MethodInfo methodInfo

Returns
System.Func<System.Object, TArg1, TResult>

Type Parameters
TResult

TArg1

CreateWeakInstanceMethodCallerFunc<TResult>(MethodInfo)
public static Func<object, TResult> CreateWeakInstanceMethodCallerFunc<TResult>(MethodInfo methodInfo)
Parameters
System.Reflection.MethodInfo methodInfo

Returns
System.Func<System.Object, TResult>

Type Parameters
TResult

CreateWeakInstanceMethodCallerFunc<TArg, TResult>(MethodInfo)
public static Func<object, TArg, TResult> CreateWeakInstanceMethodCallerFunc<TArg, TResult>(MethodInfo methodInfo)
Parameters
System.Reflection.MethodInfo methodInfo

Returns
System.Func<System.Object, TArg, TResult>

Type Parameters
TArg

TResult

CreateWeakInstancePropertyGetter(Type, PropertyInfo)
public static WeakValueGetter CreateWeakInstancePropertyGetter(Type instanceType, PropertyInfo propertyInfo)
Parameters
System.Type instanceType

System.Reflection.PropertyInfo propertyInfo

Returns
Sirenix.Utilities.WeakValueGetter

CreateWeakInstancePropertySetter(Type, PropertyInfo)
public static WeakValueSetter CreateWeakInstancePropertySetter(Type instanceType, PropertyInfo propertyInfo)
Parameters
System.Type instanceType

System.Reflection.PropertyInfo propertyInfo

Returns
Sirenix.Utilities.WeakValueSetter

CreateWeakStaticFieldGetter(FieldInfo)
public static Func<object> CreateWeakStaticFieldGetter(FieldInfo fieldInfo)
Parameters
System.Reflection.FieldInfo fieldInfo

Returns
System.Func<System.Object>

CreateWeakStaticFieldSetter(FieldInfo)
public static Action<object> CreateWeakStaticFieldSetter(FieldInfo fieldInfo)
Parameters
System.Reflection.FieldInfo fieldInfo

Returns
System.Action<System.Object>