Emit() публичный Метод

public Emit ( Instruction instruction ) : FluentEmitter
instruction Mono.Cecil.Cil.Instruction
Результат FluentEmitter
		internal override FluentEmitter EmitLdc(FluentEmitter method)
		{
			return method.Emit(OpCodes.Ldc_R4, Number);
		}
Пример #2
0
		internal override FluentEmitter EmitLdc(FluentEmitter method)
		{
			switch (Number)
			{
				case -1: return method.Emit(OpCodes.Ldc_I4_M1);
				case 0: return method.Emit(OpCodes.Ldc_I4_0);
				case 1: return method.Emit(OpCodes.Ldc_I4_1);
				case 2: return method.Emit(OpCodes.Ldc_I4_2);
				case 3: return method.Emit(OpCodes.Ldc_I4_3);
				case 4: return method.Emit(OpCodes.Ldc_I4_4);
				case 5: return method.Emit(OpCodes.Ldc_I4_5);
				case 6: return method.Emit(OpCodes.Ldc_I4_6);
				case 7: return method.Emit(OpCodes.Ldc_I4_7);
				case 8: return method.Emit(OpCodes.Ldc_I4_8);
			}

			if (Number < sbyte.MinValue || Number > sbyte.MaxValue)
				return method.Emit(OpCodes.Ldc_I4, Number);

			return method.Emit(OpCodes.Ldc_I4_S, (sbyte) Number);
		}
Пример #3
0
 internal override FluentEmitter EmitLdc(FluentEmitter method)
 {
     return(method.Emit(Number ? OpCodes.Ldc_I4_1 : OpCodes.Ldc_I4_0));
 }
Пример #4
0
 internal override FluentEmitter EmitLdc(FluentEmitter method)
 {
     return(method.Emit(OpCodes.Ldc_R8, Number));
 }
		internal override FluentEmitter EmitLdc(FluentEmitter method)
		{
			return method.Emit(Number ? OpCodes.Ldc_I4_1 : OpCodes.Ldc_I4_0);
		}