view 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 source

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;			
		}
	}
}