Show / Hide Table of Contents

Struct TextConsumer

Represents implementation of IReadOnlySpanConsumer<T> in the form of the writer to TextWriter.

Implements
IReadOnlySpanConsumer<char>
ISupplier<ReadOnlyMemory<char>, CancellationToken, ValueTask>
IFunctional<Func<ReadOnlyMemory<char>, CancellationToken, ValueTask>>
IFlushable
IEquatable<TextConsumer>
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: DotNext.IO
Assembly: DotNext.dll
Syntax
public readonly record struct TextConsumer : IReadOnlySpanConsumer<char>, ISupplier<ReadOnlyMemory<char>, CancellationToken, ValueTask>, IFunctional<Func<ReadOnlyMemory<char>, CancellationToken, ValueTask>>, IFlushable, IEquatable<TextConsumer>

Constructors

| Edit this page View Source

TextConsumer(TextWriter)

Represents implementation of IReadOnlySpanConsumer<T> in the form of the writer to TextWriter.

Declaration
public TextConsumer(TextWriter output)
Parameters
Type Name Description
TextWriter output

The text writer.

Properties

| Edit this page View Source

IsEmpty

Gets a value indicating that the underlying text writer is null.

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

ToString()

Returns a string that represents the underlying writer.

Declaration
public override string? ToString()
Returns
Type Description
string

A string that represents the underlying writer.

Overrides
ValueType.ToString()

Operators

| Edit this page View Source

implicit operator TextConsumer(TextWriter)

Wraps the text writer.

Declaration
public static implicit operator TextConsumer(TextWriter output)
Parameters
Type Name Description
TextWriter output

The text writer.

Returns
Type Description
TextConsumer

The wrapped text writer.

Exceptions
Type Condition
ArgumentNullException

output is null.

Implements

IReadOnlySpanConsumer<T>
ISupplier<T1, T2, TResult>
IFunctional<TDelegate>
IFlushable
IEquatable<T>

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
Collection.ToAsyncEnumerator<TEnumerator, T>(TEnumerator, CancellationToken)
Collection.ToClassicEnumerator<TEnumerator, T>(TEnumerator)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
ExpressionBuilder.Const<T>(T)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾