Exemple #1
0
        protected override JavaScriptObject Execute(SourcePosition pos, Scope scope, JavaScriptObject thisObject)
        {
            JavaScriptInteger sleeptime = scope.GetVariable("milliseconds", pos).ToInteger();

            Thread.Sleep(sleeptime.Value);
            return(sleeptime);
        }
Exemple #2
0
 public IntegerNode(SourcePosition pos, int number)
     : base(pos)
 {
     this.number = new JavaScriptInteger(number);
 }
Exemple #3
0
        public override int CompareTo(JavaScriptObject obj)
        {
            JavaScriptInteger number = (JavaScriptInteger)obj;

            return(value.CompareTo(number.value));
        }
Exemple #4
0
 public JavaScriptInteger Power(JavaScriptInteger n)
 {
     return(new JavaScriptInteger(Convert.ToInt32(Math.Pow(value, n.value))));
 }
Exemple #5
0
 public JavaScriptInteger Remainder(JavaScriptInteger divisor)
 {
     return(new JavaScriptInteger(value % divisor.value));
 }
Exemple #6
0
 public JavaScriptInteger Divide(JavaScriptInteger divisor)
 {
     return(new JavaScriptInteger(value / divisor.value));
 }
Exemple #7
0
 public JavaScriptInteger Multiply(JavaScriptInteger multiplicand)
 {
     return(new JavaScriptInteger(value * multiplicand.value));
 }
Exemple #8
0
 public JavaScriptInteger Subtract(JavaScriptInteger subtrahend)
 {
     return(new JavaScriptInteger(value - subtrahend.value));
 }
Exemple #9
0
 public JavaScriptInteger Add(JavaScriptInteger augend)
 {
     return(new JavaScriptInteger(value + augend.value));
 }
 public JavaScriptInteger Multiply(JavaScriptInteger multiplicand)
 {
     return new JavaScriptInteger(value * multiplicand.value);
 }
 public JavaScriptInteger Divide(JavaScriptInteger divisor)
 {
     return new JavaScriptInteger(value / divisor.value);
 }
 public JavaScriptInteger Add(JavaScriptInteger augend)
 {
     return new JavaScriptInteger(value + augend.value);
 }
 public JavaScriptInteger Subtract(JavaScriptInteger subtrahend)
 {
     return new JavaScriptInteger(value - subtrahend.value);
 }
 public JavaScriptInteger Remainder(JavaScriptInteger divisor)
 {
     return new JavaScriptInteger(value % divisor.value);
 }
 public JavaScriptInteger Power(JavaScriptInteger n)
 {
     return new JavaScriptInteger(Convert.ToInt32(Math.Pow(value, n.value)));
 }