Exemplo n.º 1
0
            /// <summary>
            /// Asynchronously writes a null value.
            /// </summary>
            /// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is System.Threading.CancellationToken.None.</param>
            /// <returns>A System.Threading.Tasks.Task that represents the asynchronous operation.</returns>
            /// <remarks>Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task.</remarks>
            public override async Task WriteNullAsync(CancellationToken cancellationToken = default)
            {
                await base.WriteNullAsync(cancellationToken);

                WroteEvent?.Invoke(this, new EventArgs());
            }
Exemplo n.º 2
0
            /// <summary>
            /// Asynchronously writes a System.String value.
            /// </summary>
            /// <param name="value">The System.String value to write.</param>
            /// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is System.Threading.CancellationToken.None.</param>
            /// <returns>A System.Threading.Tasks.Task that represents the asynchronous operation.</returns>
            /// <remarks>Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task.</remarks>
            public override async Task WriteValueAsync(string value, CancellationToken cancellationToken = default)
            {
                await base.WriteValueAsync(value, cancellationToken);

                WroteEvent?.Invoke(this, new EventArgs());
            }