public BooleanInstance Construct(JsBoolean value)
        {
            var instance = new BooleanInstance(Engine)
            {
                _prototype     = PrototypeObject,
                PrimitiveValue = value,
            };

            return(instance);
        }
Exemplo n.º 2
0
 string?AsString(JsValue?value)
 {
     return(value switch {
         JsBoolean b => b.AsBoolean() ? "true" : "false",
         JsString s => s.AsString(),
         JsNumber n => n.AsNumber().ToString(CultureInfo.InvariantCulture),
         JsNull => null,
         JsUndefined => null,
         { } v => _json.Stringify(JsValue.Undefined, new[] { v }).AsString(),
         _ => null
     });
 static string?AsString(JsValue?value, JsonInstance json, bool formatForRaw)
 {
     return(value switch {
         JsBoolean b => b.AsBoolean() ? "true" : "false",
         JsString s => formatForRaw ? $"\"{s.AsString()}\"": s.AsString(),
         JsNumber n => n.AsNumber().ToString(CultureInfo.InvariantCulture),
         JsNull => null,
         JsUndefined => null,
         { } v => json.Stringify(JsValue.Undefined, new[] { v }).AsString(),
         _ => null
     });
Exemplo n.º 4
0
 protected override object ConvertValueToSet(Engine engine, object value)
 {
     // we expect value to be generally CLR type, convert when possible
     return(value switch
     {
         JsBoolean jsBoolean => jsBoolean._value ? JsBoolean.BoxedTrue : JsBoolean.BoxedFalse,
         JsString jsString => jsString.ToString(),
         JsNumber jsNumber => jsNumber._value,
         JsNull => null,
         JsUndefined => null,
         _ => value
     });
Exemplo n.º 5
0
        public void ShouldBeABoolean()
        {
            var value = new JsBoolean(true);

            Assert.Equal(true, value.IsBoolean());
            Assert.Equal(false, value.IsArray());
            Assert.Equal(false, value.IsDate());
            Assert.Equal(false, value.IsNull());
            Assert.Equal(false, value.IsNumber());
            Assert.Equal(false, value.IsObject());
            Assert.Equal(true, value.IsPrimitive());
            Assert.Equal(false, value.IsRegExp());
            Assert.Equal(false, value.IsString());
            Assert.Equal(false, value.IsUndefined());

            Assert.Equal(true, value.AsBoolean());
        }
Exemplo n.º 6
0
 public static void setShowStackTraces(JsBoolean show) { }
Exemplo n.º 7
0
 public void enableScissorTest(JsBoolean enable)
 {
 }
Exemplo n.º 8
0
 public void setShowCommandLine(JsBoolean showCommandLine) { }
Exemplo n.º 9
0
 public ParametricGeometry(JsFunc<JsNumber, JsNumber, JsNumber> func, JsNumber slices, JsNumber stacks, JsBoolean useTris) { }
Exemplo n.º 10
0
 public BoxGeometry(JsNumber width, JsNumber height, JsNumber depth, JsNumber segmentsWidth, JsNumber segmentsHeight, JsNumber segmentsDepth, Material[] materials, JsBoolean[] sides) { }
Exemplo n.º 11
0
 public PopUpAppender(JsBoolean lazyInit, JsBoolean initiallyMinimized, JsBoolean useDocumentWrite, JsNumber width, JsNumber height)
 {
 }
Exemplo n.º 12
0
 public void setInitiallyMinimized(JsBoolean initiallyMinimized)
 {
 }
Exemplo n.º 13
0
 /// <summary>
 /// [not available after first message logged]
 /// Whether to send all remaining unsent log messages to the server when the page unloads.
 /// </summary>
 /// <param name="sendAllOnUnload"></param>
 public void setSendAllOnUnload(JsBoolean sendAllOnUnload)
 {
 }
Exemplo n.º 14
0
 public static Vector3 randomPointInFace(Face4 face, Geometry geometry, JsBoolean useCachedAreas)
 {
     return(null);
 }
Exemplo n.º 15
0
 public void render(Scene scene, Camera camera, WebGLRenderTarget renderTarget, JsBoolean forceClear) { }
Exemplo n.º 16
0
 public void render(Scene scene, Camera camera, WebGLRenderTarget renderTarget, JsBoolean forceClear)
 {
 }
Exemplo n.º 17
0
 public BooleanInstance(Engine engine, JsBoolean value)
     : base(engine, ObjectClass.Boolean)
 {
     BooleanData = value;
 }
 public static void setShowStackTraces(JsBoolean show)
 {
 }
 public static void setEnabled(JsBoolean enabled)
 {
 }
Exemplo n.º 20
0
 /// <summary>
 /// Sets whether to focus the pop-up window (i.e. bring it to the front) when a new log message is added
 /// </summary>
 /// <param name="focusPopUp"></param>
 public void setFocusPopUp(JsBoolean focusPopUp)
 {
 }
Exemplo n.º 21
0
 /// <summary>
 /// [not available after initialization]
 /// Sets whether the console window should start off hidden / minimized. 
 /// </summary>
 /// <param name="initiallyMinimized"></param>
 public void setInitiallyMinimized(JsBoolean initiallyMinimized) { }
Exemplo n.º 22
0
 public void clear(JsBoolean color, JsBoolean depth, JsBoolean stencil)
 {
 }
Exemplo n.º 23
0
 public void clear(JsBoolean color, JsBoolean depth, JsBoolean stencil) { }
Exemplo n.º 24
0
 public void TakePicture(JsNumber quality, JsBoolean saveToLib, PictureType picType) { }
Exemplo n.º 25
0
 public void setScrollToLatestMessage(JsBoolean scrollToLatestMessage)
 {
 }
Exemplo n.º 26
0
 public void ManagePower(JsBoolean shouldStayOn, JsBoolean onlyWhenPluggedIn) { }
Exemplo n.º 27
0
 public Object3D getChildByName(JsString name, JsBoolean doRecurse) { return this;  }
Exemplo n.º 28
0
 public void SetAutoRotate(JsBoolean shouldAutoRotate) { }
Exemplo n.º 29
0
 public virtual void group(JsString name, JsBoolean initiallyExpanded)
 {
 }
Exemplo n.º 30
0
 public void BlockRemotePages(JsBoolean shouldBlock,JsString whitelist) { }
Exemplo n.º 31
0
 public void setScrollToLatestMessage(JsBoolean scrollToLatestMessage) { }
Exemplo n.º 32
0
 public void SendEmail(JsString bodyText, JsString toString, JsString subjectText, JsBoolean isHTML, JsString ccString, JsString bccString) { }
Exemplo n.º 33
0
 public ParametricGeometry(JsFunc <JsNumber, JsNumber, JsNumber> func, JsNumber slices, JsNumber stacks, JsBoolean useTris)
 {
 }
Exemplo n.º 34
0
 public void GetRemoteDataImpl(JsString url, MethodGetPost requestMethod, JsString requestBody, JsString successCallback, JsString errorCallback, JsNumber uniqueIdentifier, JsBoolean hasId) { }
Exemplo n.º 35
0
 public static void setEnabled(JsBoolean enabled) { }
Exemplo n.º 36
0
 public void BroadcastPushNotification(JsString message, JsString data, PushUserAttributes attributes, JsBoolean skip) { }   // TODO verify type
Exemplo n.º 37
0
 public void HandleResponse(JsString eventName,JsBoolean success, JsString responseData, object extra) { }      // TODO verify type
Exemplo n.º 38
0
 public void StartBackgroundSound(JsString relativeFileUrl, JsBoolean isLooping) { }
Exemplo n.º 39
0
 public static Vector3 randomPointInFace(Face4 face, Geometry geometry, JsBoolean useCachedAreas) { return null; }
Exemplo n.º 40
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="x">The force applied by the device in the x-axis (in m/s^2).</param>
 /// <param name="y">The force applied by the device in the y-axis (in m/s^2).</param>
 /// <param name="z">The force applied by the device in the z-axis (in m/s^2).</param>
 /// <param name="doRotate">If true, rotate axes based on device rotation.</param>
 public Acceleration(JsNumber x, JsNumber y, JsNumber z, JsBoolean doRotate) { }
Exemplo n.º 41
0
 public PopUpAppender(JsBoolean lazyInit, JsBoolean initiallyMinimized, JsBoolean useDocumentWrite, JsNumber width, JsNumber height) { }
Exemplo n.º 42
0
 public Vector2[] getPoints(JsNumber divisions, JsBoolean closedPath) { return null; }
Exemplo n.º 43
0
 /// <summary>
 /// Sets whether to focus the pop-up window (i.e. bring it to the front) when a new log message is added
 /// </summary>
 /// <param name="focusPopUp"></param>
 public void setFocusPopUp(JsBoolean focusPopUp) { }
Exemplo n.º 44
0
 public CylinderGeometry(JsNumber radiusTop, JsNumber radiusBottom, JsNumber height, JsNumber radiusSegments, JsNumber heightSegments, JsBoolean openEnded)
 {
 }
Exemplo n.º 45
0
 public void enableScissorTest(JsBoolean enable) { }
Exemplo n.º 46
0
 SpotLight(JsNumber hex, JsNumber intensity, JsNumber distance, JsBoolean castShadow) { }
Exemplo n.º 47
0
 public InPageAppender(HtmlElement container, JsBoolean lazyInit, JsBoolean initiallyMinimized, JsBoolean useDocumentWrite, JsString width, JsString height)
 {
 }
Exemplo n.º 48
0
 SpotLight(JsNumber hex, JsNumber intensity, JsNumber distance, JsBoolean castShadow)
 {
 }
Exemplo n.º 49
0
 public void setNewestMessageAtTop(JsBoolean newestMessageAtTop)
 {
 }
Exemplo n.º 50
0
 public Vector2[] getPoints(JsNumber divisions, JsBoolean closedPath)
 {
     return(null);
 }
Exemplo n.º 51
0
 public void setShowCommandLine(JsBoolean showCommandLine)
 {
 }
Exemplo n.º 52
0
 public Object3D getChildByName(JsString name, JsBoolean doRecurse)
 {
     return(this);
 }
Exemplo n.º 53
0
 /// <summary>
 /// [not available after first message logged]
 /// Sets whether to wait for a response from a previous HTTP request from this appender before sending the next log message / batch of messages. Default value is false.
 /// </summary>
 /// <param name="waitForResponse"></param>
 public void setWaitForResponse(JsBoolean waitForResponse)
 {
 }
Exemplo n.º 54
0
 public void updateMatrixWorld(JsBoolean force)
 {
 }
Exemplo n.º 55
0
 public void updateMatrixWorld(JsBoolean force) { }
Exemplo n.º 56
0
 public InPageAppender(HtmlElement container, JsBoolean lazyInit, JsBoolean initiallyMinimized, JsBoolean useDocumentWrite, JsString width, JsString height) { }
Exemplo n.º 57
0
 public CylinderGeometry(JsNumber radiusTop, JsNumber radiusBottom, JsNumber height, JsNumber radiusSegments, JsNumber heightSegments, JsBoolean openEnded) { }
Exemplo n.º 58
0
 public void setNewestMessageAtTop(JsBoolean newestMessageAtTop) { }
Exemplo n.º 59
0
 /// <summary>
 /// Sets whether appender additivity is enabled (the default) or disabled. If set to false, this particular logger will not inherit any appenders form its ancestors. Any descendant of this logger, however, will inherit from its ancestors as normal, unless its own additivity is explicitly set to false. Default value is true.
 /// </summary>
 /// <param name="additivity"></param>
 public void setAdditivity(JsBoolean additivity)
 {
 }
Exemplo n.º 60
0
 public FrenetFrames(Path path, JsNumber segments, JsBoolean closed)
 {
 }