RazorEngine


EmitExtensions

Defined in RazorEngine.dll.

Extension Methods that make emiting code easier and easier to read

Static members

Static memberDescription
EmitArray(...)
Signature: (generator:ILGenerator * arrayType:Type * emitElements:IList<Action<ILGenerator>>) -> unit

Emits an array.

EmitBranchFalse(generator, condition)
Signature: (generator:ILGenerator * condition:Action<ILGenerator>) -> BranchFalseOverBlock

Emits branch false. expects using keyword.

Returns:

EmitBranchTrue(generator, condition)
Signature: (generator:ILGenerator * condition:Action<ILGenerator>) -> BranchTrueOverBlock

Emits branch true. expects using keyword.

Returns:

EmitCallInvokeFunc(generator, funcType)
Signature: (generator:ILGenerator * funcType:Type) -> unit

Emits the call invoke delegate.

EmitCallsiteCreate(generator, funcType)
Signature: (generator:ILGenerator * funcType:Type) -> unit

Emits creating the callsite.

EmitCreateCSharpArgumentInfo(...)
Signature: (generator:ILGenerator * flag:CSharpArgumentInfoFlags * name:string) -> unit

Emits creating the CSharpArgumentInfo

EmitDynamicBinaryOpBinder(...)
Signature: (generator:ILGenerator * flag:CSharpBinderFlags * exprType:ExpressionType * context:Type * argTypes:Type []) -> unit

Emits the dynamic binary op binder.

EmitDynamicConvertBinder(...)
Signature: (generator:ILGenerator * flag:CSharpBinderFlags * returnType:Type * context:Type) -> unit

Emits the dynamic convert binder.

EmitDynamicGetBinder(...)
Signature: (generator:ILGenerator * flag:CSharpBinderFlags * name:string * context:Type * argTypes:Type []) -> unit

Emits the dynamic get binder.

EmitDynamicIsEventBinder(...)
Signature: (generator:ILGenerator * flag:CSharpBinderFlags * name:string * context:Type) -> unit

Emits the dynamic event binder.

EmitDynamicMethodInvokeBinder(...)
Signature: (generator:ILGenerator * flag:CSharpBinderFlags * name:string * genericParms:IEnumerable<Type> * context:Type * argInfo:ParameterInfo [] * argNames:IEnumerable<string>) -> unit

Emits the dynamic method invoke binder.

EmitDynamicSetBinder(...)
Signature: (generator:ILGenerator * flag:CSharpBinderFlags * name:string * context:Type * argTypes:Type []) -> unit

Emits the dynamic set binder.

EmitDynamicSetBinderDynamicParams(...)
Signature: (generator:ILGenerator * flag:CSharpBinderFlags * name:string * context:Type * argTypes:Type []) -> unit

Emits the dynamic set binder dynamic params.

EmitInvocation(...)
Signature: (generator:ILGenerator * target:Action<ILGenerator> * call:Action<ILGenerator> * parameters:Action<ILGenerator> []) -> unit

Emits the call.

EmitLoadArgument(generator, location)
Signature: (generator:ILGenerator * location:int) -> unit

Emits the load argument.

EmitLoadLocation(generator, location)
Signature: (generator:ILGenerator * location:int) -> unit

Emits the load location.

EmitStoreLocation(generator, location)
Signature: (generator:ILGenerator * location:int) -> unit

Emits the store location.

EmitTypeOf(generator, type)
Signature: (generator:ILGenerator * type:Type) -> unit

Emits the typeof(Type)

EmitTypeOf(generator, type)
Signature: (generator:ILGenerator * type:TypeToken) -> unit

Emits the typeof(Type)

GetFieldEvenIfGeneric(type, fieldName)
Signature: (type:Type * fieldName:string) -> FieldInfo

Gets the field info even if generic type parameter.

Returns:

GetMethodEvenIfGeneric(...)
Signature: (type:Type * methodName:string * argTypes:Type []) -> MethodInfo

Gets the method info even if generic type parameter.

Returns:

GetMethodEvenIfGeneric(type, methodName)
Signature: (type:Type * methodName:string) -> MethodInfo

Gets the method info even if generic type parameter.

Returns:

Fork me on GitHub