EmitUtilities

Provides utilities for using the Emit namespace.

This class is due for refactoring. Use at your own peril.

namespace Sirenix.Utilities
{
public static class EmitUtilities
}

Requirements

Namespace: Sirenix.Utilities
Assembly: Sirenix.OdinInspector
Version: 2.0.0.0

Static Properties

Return Type Definition Description
bool CanEmit Gets a value indicating whether emitting is supported on the current platform.

Static Methods

Return Type Definition Description
ValueGetter<InstanceType, FieldType> CreateInstanceFieldGetter<InstanceType, FieldType>(FieldInfo) Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
ValueSetter<InstanceType, FieldType> CreateInstanceFieldSetter<InstanceType, FieldType>(FieldInfo) Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
Action<InstanceType, Arg1> CreateInstanceMethodCaller<InstanceType, Arg1>(MethodInfo) Creates a fast delegate method which calls a given instance method with a given argument.
Action<InstanceType> CreateInstanceMethodCaller<InstanceType>(MethodInfo) Creates a fast delegate method which calls a given parameterless instance method.
ValueGetter<InstanceType, PropType> CreateInstancePropertyGetter<InstanceType, PropType>(PropertyInfo) Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
ValueSetter<InstanceType, PropType> CreateInstancePropertySetter<InstanceType, PropType>(PropertyInfo) Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
Func<InstanceType, ReturnType> CreateMethodReturner<InstanceType, ReturnType>(MethodInfo) Creates a fast delegate method which calls a given parameterless instance method and returns the result.
Func<FieldType> CreateStaticFieldGetter<FieldType>(FieldInfo) Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
Action<FieldType> CreateStaticFieldSetter<FieldType>(FieldInfo) Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
Action CreateStaticMethodCaller(MethodInfo) Creates a fast delegate method which calls a given parameterless static method.
Func<PropType> CreateStaticPropertyGetter<PropType>(PropertyInfo) Creates a delegate which gets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
Action<PropType> CreateStaticPropertySetter<PropType>(PropertyInfo) Creates a delegate which sets the value of a property. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
WeakValueGetter CreateWeakInstanceFieldGetter(Type, FieldInfo) Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
WeakValueGetter<FieldType> CreateWeakInstanceFieldGetter<FieldType>(Type, FieldInfo) Creates a delegate which gets the value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
WeakValueSetter CreateWeakInstanceFieldSetter(Type, FieldInfo) Creates a delegate which sets the weakly typed value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
WeakValueSetter<FieldType> CreateWeakInstanceFieldSetter<FieldType>(Type, FieldInfo) Creates a delegate which sets the value of a field on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
Action<Object> CreateWeakInstanceMethodCaller(MethodInfo) Not yet documented.
Action<Object, TArg1> CreateWeakInstanceMethodCaller<TArg1>(MethodInfo) Creates a fast delegate method which calls a given parameterless weakly typed instance method.
Func<Object, TArg1, TResult> CreateWeakInstanceMethodCaller<TResult, TArg1>(MethodInfo) Creates a fast delegate method which calls a given weakly typed instance method with one argument and returns a value.
Func<Object, TArg, TResult> CreateWeakInstanceMethodCallerFunc<TArg, TResult>(MethodInfo) Not yet documented.
Func<Object, TResult> CreateWeakInstanceMethodCallerFunc<TResult>(MethodInfo) Not yet documented.
WeakValueGetter CreateWeakInstancePropertyGetter(Type, PropertyInfo) Creates a delegate which gets the weakly typed value of a field from a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
WeakValueSetter CreateWeakInstancePropertySetter(Type, PropertyInfo) Creates a delegate which sets the weakly typed value of a property on a weakly typed instance of a given type. If emitting is not supported on the current platform, the delegate will use reflection to set the value.
Func<Object> CreateWeakStaticFieldGetter(FieldInfo) Creates a delegate which gets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to get the value.
Action<Object> CreateWeakStaticFieldSetter(FieldInfo) Creates a delegate which sets the value of a field. If emitting is not supported on the current platform, the delegate will use reflection to set the value.