示例#1
0
文件: _Types.cs 项目: sonygod/dotahit
 public virtual DHJassBoolean NotEquals(DHJassValue value)
 {
     DHJassBoolean result = new DHJassBoolean();
     result.Value = (DHJassSyntax.Comparer.Compare(this.Value, value.Value) != 0);
     return result;
 }
示例#2
0
文件: _Types.cs 项目: sonygod/dotahit
        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;
        }
示例#3
0
文件: _Types.cs 项目: sonygod/dotahit
 public virtual DHJassBoolean LessOrEqual(DHJassValue value)
 {
     DHJassBoolean result = new DHJassBoolean();
     result.Value = DHJassSyntax.Comparer.Compare(this.Value, value.Value) <= 0;
     return result;
 }
示例#4
0
文件: _Types.cs 项目: sonygod/dotahit
 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;
 }
示例#5
0
文件: _Types.cs 项目: sonygod/dotahit
 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;
 }
示例#6
0
文件: _Types.cs 项目: sonygod/dotahit
        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;
        }
示例#7
0
文件: _Types.cs 项目: sonygod/dotahit
        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;
        }