Show / Hide Table of Contents

Struct TextConsumer

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

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

Constructors

View Source

TextConsumer(TextWriter)

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

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

The text writer.

Properties

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

View Source

Deconstruct(out TextWriter)

Declaration
public void Deconstruct(out TextWriter output)
Parameters
Type Name Description
TextWriter output
View Source

Equals(TextConsumer)

Declaration
public bool Equals(TextConsumer other)
Parameters
Type Name Description
TextConsumer other
Returns
Type Description
bool
View Source

Equals(object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
ValueType.Equals(object)
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()
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

View Source

operator ==(TextConsumer, TextConsumer)

Declaration
public static bool operator ==(TextConsumer left, TextConsumer right)
Parameters
Type Name Description
TextConsumer left
TextConsumer right
Returns
Type Description
bool
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.

View Source

operator !=(TextConsumer, TextConsumer)

Declaration
public static bool operator !=(TextConsumer left, TextConsumer right)
Parameters
Type Name Description
TextConsumer left
TextConsumer right
Returns
Type Description
bool

Implements

IConsumer<T>
ISupplier<T1, T2, TResult>
IFunctional
IFlushable
IEquatable<T>

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾