Mercurial > pub > Jint1
view 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 source
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 } }