Show / Hide Table of Contents

Struct StringBuilderConsumer

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

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

Constructors

View Source

StringBuilderConsumer(StringBuilder)

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

Declaration
public StringBuilderConsumer(StringBuilder builder)
Parameters
Type Name Description
StringBuilder builder

The builder.

Exceptions
Type Condition
ArgumentNullException

builder is null.

Properties

View Source

IsEmpty

Gets a value indicating that the underlying builder is null.

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

builder is null.

Methods

View Source

Deconstruct(out StringBuilder)

Declaration
public void Deconstruct(out StringBuilder builder)
Parameters
Type Name Description
StringBuilder builder
Exceptions
Type Condition
ArgumentNullException

builder is null.

View Source

Equals(StringBuilderConsumer)

Declaration
public bool Equals(StringBuilderConsumer other)
Parameters
Type Name Description
StringBuilderConsumer other
Returns
Type Description
bool
Exceptions
Type Condition
ArgumentNullException

builder is null.

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)
Exceptions
Type Condition
ArgumentNullException

builder is null.

View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()
Exceptions
Type Condition
ArgumentNullException

builder is null.

View Source

ToString()

Declaration
public override string? ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()
Exceptions
Type Condition
ArgumentNullException

builder is null.

Operators

View Source

operator ==(StringBuilderConsumer, StringBuilderConsumer)

Declaration
public static bool operator ==(StringBuilderConsumer left, StringBuilderConsumer right)
Parameters
Type Name Description
StringBuilderConsumer left
StringBuilderConsumer right
Returns
Type Description
bool
Exceptions
Type Condition
ArgumentNullException

builder is null.

View Source

implicit operator StringBuilderConsumer(StringBuilder)

Wraps the builder.

Declaration
public static implicit operator StringBuilderConsumer(StringBuilder builder)
Parameters
Type Name Description
StringBuilder builder

The builder.

Returns
Type Description
StringBuilderConsumer

The wrapped stream.

Exceptions
Type Condition
ArgumentNullException

builder is null.

View Source

operator !=(StringBuilderConsumer, StringBuilderConsumer)

Declaration
public static bool operator !=(StringBuilderConsumer left, StringBuilderConsumer right)
Parameters
Type Name Description
StringBuilderConsumer left
StringBuilderConsumer right
Returns
Type Description
bool
Exceptions
Type Condition
ArgumentNullException

builder is null.

Implements

IConsumer<T>
ISupplier<T1, T2, TResult>
IFunctional
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
☀
☾