Esempio n. 1
0
 public virtual DHJassBoolean NotEquals(DHJassValue value)
 {
     DHJassBoolean result = new DHJassBoolean();
     result.Value = (DHJassSyntax.Comparer.Compare(this.Value, value.Value) != 0);
     return result;
 }
Esempio n. 2
0
        public override DHJassBoolean Equals(DHJassValue value)
        {
            DHJassBoolean result = new DHJassBoolean();

            object obj = value.Value;
            if (obj == null)
                result.Value = (this.value == 0);
            else
                result.Value = (DHJassSyntax.Comparer.Compare(this.Value, obj) == 0);

            return result;
        }
Esempio n. 3
0
 public virtual DHJassBoolean LessOrEqual(DHJassValue value)
 {
     DHJassBoolean result = new DHJassBoolean();
     result.Value = DHJassSyntax.Comparer.Compare(this.Value, value.Value) <= 0;
     return result;
 }
Esempio n. 4
0
 public virtual DHJassBoolean Less(DHJassValue value)
 {
     DHJassBoolean result = new DHJassBoolean();
     try
     {
         result.Value = DHJassSyntax.Comparer.Compare(this.Value, value.Value) < 0;
     }
     catch { result.Value = false; }
     return result;
 }
Esempio n. 5
0
 public override DHJassBoolean NotEquals(DHJassValue value)
 {
     DHJassBoolean result = new DHJassBoolean();
     try
     {
         if (value is DHJassString)
             result.Value = (DHJassSyntax.Comparer.Compare(this.Value, value.Value) != 0);
         else
             result.Value = (DHJassSyntax.Comparer.Compare(this.RealValue, value.RealValue) != 0);
     }
     catch { result.Value = false; }
     return result;
 }
Esempio n. 6
0
        public override DHJassBoolean NotEquals(DHJassValue value)
        {
            DHJassBoolean result = new DHJassBoolean();

            object obj = value.Value;
            if (obj is int)
                result.Value = DHJassSyntax.Comparer.Compare(this.Value, (double)(int)obj) != 0;
            else
                result.Value = DHJassSyntax.Comparer.Compare(this.Value, obj) != 0;
            return result;
        }
Esempio n. 7
0
        public override DHJassBoolean Less(DHJassValue value)
        {
            DHJassBoolean result = new DHJassBoolean();

            object obj = value.Value;
            if (obj is double)
                result.Value = DHJassSyntax.Comparer.Compare(this.Value, (int)(double)value.Value) < 0;
            else
                result.Value = DHJassSyntax.Comparer.Compare(this.Value, value.Value) < 0;

            return result;
        }