예제 #1
0
        public EcmaValue(Symbol value)
        {
            if (value.SymbolType != 0)
            {
                this.handle  = new EcmaValueHandle((long)value.SymbolType);
                this.binder_ = WellKnownSymbolBinder.Default;
            }
            else
            {
                IEcmaValueBinder binder = PrimitiveBinderWrapper <Symbol> .GetBinder(value, SymbolBinder.Default);

                this.handle  = binder.ToHandle(value);
                this.binder_ = binder;
            }
        }
예제 #2
0
        public EcmaValue(string value)
        {
            if (value == null)
            {
                this.handle  = default;
                this.binder_ = default;
            }
            else
            {
                IEcmaValueBinder binder = WellKnownPropertyNameBinder.IsWellKnownPropertyName(value) ? WellKnownPropertyNameBinder.Default : PrimitiveBinderWrapper <string> .GetBinder(value, StringBinder.Default);

                this.handle  = binder.ToHandle(value);
                this.binder_ = binder;
            }
        }