Mercurial > pub > Jint1
view Jint.Runtime/VM/RuntimeContext.cs @ 0:e113095f1de0
initial commit, proof of concept
author | cin |
---|---|
date | Wed, 23 Oct 2013 13:24:57 +0400 |
parents | |
children | aced2ae9957f |
line wrap: on
line source
using System; using System.Collections.Generic; namespace Jint.Runtime.VM { public class RuntimeContext { Dictionary<Type,object> m_binders; public RuntimeContext () { m_binders = new Dictionary<Type,object> (); m_binders.Add (typeof(int), new IntegerBinder ()); } public Box<T> BoxValue<T>(T value) { return new Box<T> (value, GetBinder<T> ()); } public IBinder<T> GetBinder<T>() { return (IBinder<T>) m_binders [typeof(T)]; } } }