comparison Jint.Runtime/VM/IntegerBinder.cs @ 0:e113095f1de0

initial commit, proof of concept
author cin
date Wed, 23 Oct 2013 13:24:57 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e113095f1de0
1 using System;
2
3 namespace Jint.Runtime.VM
4 {
5 public class IntegerBinder: IBinder<int>
6 {
7 #region IBinder implementation
8
9
10
11 #endregion
12
13 #region IBinder implementation
14
15 public bool Equals (int arg1, int arg2)
16 {
17 throw new NotImplementedException ();
18 }
19
20 public int Compare (int arg1, int arg2)
21 {
22 throw new NotImplementedException ();
23 }
24
25 public T2 Convert<T2> (int arg)
26 {
27 return (T2)Convert.ChangeType(arg,typeof(T2)) ;
28 }
29 public int OpAdd (int arg1, int arg2)
30 {
31 return arg1 + arg2;
32 }
33
34 public int OpSub (int arg1, int arg2)
35 {
36 return arg1 - arg2;
37 }
38
39 public int OpMul (int arg1, int arg2)
40 {
41 return arg1 * arg2;
42 }
43
44 #endregion
45 }
46 }
47