コード例 #1
0
        private void OnError(string error)
        {
            OnCircuitError?.Invoke(error);

            var exception = FormatError?.Invoke(error) ?? new Exception(error);

            NextBatchReceived?.Completion?.TrySetException(exception);
            NextDotNetInteropCompletionReceived?.Completion.TrySetException(exception);
            NextJSInteropReceived?.Completion.TrySetException(exception);
            NextErrorReceived?.Completion?.TrySetResult(null);
        }
コード例 #2
0
ファイル: BlazorClient.cs プロジェクト: jiahengaa/AspNetCore
        private void OnError(string error)
        {
            Operations?.Errors.Enqueue(error);
            OnCircuitError?.Invoke(error);

            // If we get an error, forcibly terminate anything else we're waiting for. These
            // tests should only encounter errors in specific situations, and this ensures that
            // we fail with a good message.
            var exception = FormatError?.Invoke(error) ?? new Exception(error);

            NextBatchReceived?.Completion?.TrySetException(exception);
            NextDotNetInteropCompletionReceived?.Completion.TrySetException(exception);
            NextJSInteropReceived?.Completion.TrySetException(exception);
            NextErrorReceived?.Completion?.TrySetResult(null);
        }
コード例 #3
0
ファイル: NumericTextBox.cs プロジェクト: Ovis/yeti.mmedia
 protected virtual void OnFormatError(EventArgs e)
 {
     FormatError?.Invoke(this, e);
 }