protected override string InvokeJS(string identifier, string argsJson) { if (!_node.CheckAccess()) { return(_node.Run(() => _jsCallDispatcher.invokeJSFromDotNet(identifier, argsJson)).Result); } return(_jsCallDispatcher.invokeJSFromDotNet(identifier, argsJson)); }
public void Write(LogLevel logLevel, string finalMessage) { if (_node.CheckAccess()) { WriteIntern(logLevel, finalMessage); return; } var entry = Tuple.Create(logLevel, finalMessage); lock (_syncObject) { if (_queuedEntries != null) { _queuedEntries.Add(entry); return; } _queuedEntries = new List <Tuple <LogLevel, string> > { entry }; } _node.Run(WriteQueuedEntries); }
public override bool CheckAccess() => _node.CheckAccess();