Beispiel #1
0
        protected override string InvokeJS(string identifier, string argsJson)
        {
            if (!_node.CheckAccess())
            {
                return(_node.Run(() => _jsCallDispatcher.invokeJSFromDotNet(identifier, argsJson)).Result);
            }

            return(_jsCallDispatcher.invokeJSFromDotNet(identifier, argsJson));
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public override bool CheckAccess() => _node.CheckAccess();