diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Jint.Runtime/VM/IntegerBinder.cs	Wed Oct 23 13:24:57 2013 +0400
@@ -0,0 +1,47 @@
+using System;
+
+namespace Jint.Runtime.VM
+{
+	public class IntegerBinder: IBinder<int>
+	{
+		#region IBinder implementation
+
+
+
+		#endregion
+
+		#region IBinder implementation
+
+		public bool Equals (int arg1, int arg2)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public int Compare (int arg1, int arg2)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public T2 Convert<T2> (int arg)
+		{
+			return (T2)Convert.ChangeType(arg,typeof(T2)) ;
+		}
+		public int OpAdd (int arg1, int arg2)
+		{
+			return arg1 + arg2;
+		}
+
+		public int OpSub (int arg1, int arg2)
+		{
+			return arg1 - arg2;
+		}
+
+		public int OpMul (int arg1, int arg2)
+		{
+			return arg1 * arg2;
+		}
+
+		#endregion
+	}
+}
+