/// <summary>
        /// Makes a mapping of value from the script type to a host type
        /// </summary>
        /// <param name="value">The source value</param>
        /// <returns>The mapped value</returns>
        private object MapToHostType(OriginalValue value)
        {
            if (value.IsUndefined())
            {
                return(Undefined.Value);
            }

            return(value.ToObject());
        }
        /// <summary>
        /// Makes a mapping of value from the script type to a host type
        /// </summary>
        /// <param name="value">The source value</param>
        /// <returns>The mapped value</returns>
        private object MapToHostType(OriginalValue value)
        {
            switch (value.Type)
            {
            case OriginalTypes.Undefined:
                return(Undefined.Value);

            case OriginalTypes.Object:
                if (!(value is IOriginalPrimitiveInstance))
                {
                    return(value);
                }
                else
                {
                    break;
                }
            }

            return(value.ToObject());
        }
        /// <summary>
        /// Makes a mapping of value from the script type to a host type
        /// </summary>
        /// <param name="value">The source value</param>
        /// <returns>The mapped value</returns>
        private object MapToHostType(OriginalValue value)
        {
            switch (value.Type)
            {
            case OriginalTypes.Undefined:
                return(Undefined.Value);

            case OriginalTypes.Object:
                var objInstance = value.As <OriginalObjectInstance>();
                if (objInstance != null && !_primitiveClassNames.Contains(objInstance.Class))
                {
                    return(objInstance);
                }
                else
                {
                    break;
                }
            }

            return(value.ToObject());
        }