Ancestry.QueryProcessor.Type.BaseIntegerType.EmitLiteral C# (CSharp) Method

EmitLiteral() public method

public EmitLiteral ( MethodContext method, object value ) : void
method Ancestry.QueryProcessor.Compile.MethodContext
value object
return void
        public override void EmitLiteral(MethodContext method, object value)
        {
            switch (System.Runtime.InteropServices.Marshal.SizeOf(Native))
            {
                case 4:
                    method.IL.Emit(OpCodes.Ldc_I4, (int)value);
                    break;
                case 8:
                    method.IL.Emit(OpCodes.Ldc_I8, (long)value);
                    break;
                default: throw new NotSupportedException();
            }
        }