Mercurial > pub > Jint1
diff Jint.Runtime/JsObject.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/JsObject.cs Wed Oct 23 13:24:57 2013 +0400 @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; + + +namespace Jint.Runtime +{ + public class JsObject + { + ClassDescriptor m_classDescriptor; + List<object> m_data; + + public JsObject () + { + } + + public object Get (string name) + { + PropertyDescriptor descriptor; + if (m_classDescriptor.TryGet (name, out descriptor)) + return m_data.Count <= descriptor.index ? null : m_data [descriptor.index]; + else + return null; + } + } +} +