示例#1
0
        public bool TryConvert(Engine engine, object value, out JsValue result)
        {
            switch (value)
            {
            case Guid g:
                result = new JsUuid(g);
                return(true);
            }

            result = JsValue.Undefined;
            return(false);
        }
示例#2
0
 public UuidInstance Construct(JsUuid uuid) => new UuidInstance(Engine)
 {
     PrimitiveValue = uuid, _prototype = PrototypeObject
 };