Mercurial > pub > Jint1
view Jint.Runtime/VM/RuntimeContext.cs @ 1:033ebe7432d5
vm v2
author | cin |
---|---|
date | Thu, 24 Oct 2013 19:45:57 +0400 |
parents | e113095f1de0 |
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)]; } } }