Exemple #1
0
        public override void Setup()
        {
            ILGenerator Generator = Utilities.Reflection.Emit.BaseClasses.MethodBase.CurrentMethod.Generator;

            if (LeftHandSide is FieldBuilder || LeftHandSide is IPropertyBuilder)
            {
                Generator.Emit(OpCodes.Ldarg_0);
            }
            LeftHandSide.Load(Generator);
            if (RightHandSide is FieldBuilder || RightHandSide is IPropertyBuilder)
            {
                Generator.Emit(OpCodes.Ldarg_0);
            }
            RightHandSide.Load(Generator);
            if (ComparisonType == Comparison.Equal)
            {
                Generator.Emit(OpCodes.Ceq);
                Generator.Emit(OpCodes.Ldc_I4_0);
            }
            Generator.Emit(ComparisonOpCodes[ComparisonType], EndIfLabel);
        }
Exemple #2
0
        /// <summary>
        ///     Sets up the command
        /// </summary>
        public override void Setup()
        {
            ILGenerator generator = MethodBase.CurrentMethod.Generator;

            if (LeftHandSide is FieldBuilder || LeftHandSide is IPropertyBuilder)
            {
                generator.Emit(OpCodes.Ldarg_0);
            }
            LeftHandSide.Load(generator);
            if (RightHandSide is FieldBuilder || RightHandSide is IPropertyBuilder)
            {
                generator.Emit(OpCodes.Ldarg_0);
            }
            RightHandSide.Load(generator);
            if (ComparisonType == Comparison.Equal)
            {
                generator.Emit(OpCodes.Ceq);
                generator.Emit(OpCodes.Ldc_I4_0);
            }
            generator.Emit(ComparisonOpCodes[ComparisonType], EndIfLabel);
        }
Exemple #3
0
 public override IProjection[] GetProjections()
 {
     return(LeftHandSide.GetProjections().Concat(RightHandSide.GetProjections()).ToArray());
 }