Example #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="LeftHandSide">Left variable</param>
        /// <param name="RightHandSide">Right variable</param>
        public Add(object LeftHandSide, object RightHandSide)
            : base()
        {
            Utilities.Reflection.Emit.BaseClasses.MethodBase Method = Utilities.Reflection.Emit.BaseClasses.MethodBase.CurrentMethod;
            VariableBase Left  = LeftHandSide as VariableBase;
            VariableBase Right = RightHandSide as VariableBase;

            if (Left == null)
            {
                this.LeftHandSide = Method.CreateConstant(LeftHandSide);
            }
            else
            {
                this.LeftHandSide = Left;
            }
            if (Right == null)
            {
                this.RightHandSide = Method.CreateConstant(RightHandSide);
            }
            else
            {
                this.RightHandSide = Right;
            }
            Result = Utilities.Reflection.Emit.BaseClasses.MethodBase.CurrentMethod.CreateLocal("AddLocalResult" + Utilities.Reflection.Emit.BaseClasses.MethodBase.ObjectCounter.ToString(CultureInfo.InvariantCulture),
                                                                                                this.LeftHandSide.DataType);
        }
Example #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="LeftHandSide">Left variable</param>
 /// <param name="RightHandSide">Right variable</param>
 public Add(object LeftHandSide, object RightHandSide)
     : base()
 {
     Utilities.Reflection.Emit.BaseClasses.MethodBase Method = Utilities.Reflection.Emit.BaseClasses.MethodBase.CurrentMethod;
     if (!(LeftHandSide is VariableBase))
     {
         this.LeftHandSide = Method.CreateConstant(LeftHandSide);
     }
     else
     {
         this.LeftHandSide = (VariableBase)LeftHandSide;
     }
     if (!(RightHandSide is VariableBase))
     {
         this.RightHandSide = Method.CreateConstant(RightHandSide);
     }
     else
     {
         this.RightHandSide = (VariableBase)RightHandSide;
     }
     Result = Utilities.Reflection.Emit.BaseClasses.MethodBase.CurrentMethod.CreateLocal("AddLocalResult" + Utilities.Reflection.Emit.BaseClasses.MethodBase.ObjectCounter.ToString(),
                                                                                         this.LeftHandSide.DataType);
 }