Class WriteContext

Context object provided during write operations.

Inheritance
System.Object
WriteContext
Implements
System.IEquatable<WriteContext>
Namespace: Cesil
Assembly: Cesil.dll
Syntax
public sealed class WriteContext : ValueType, IEquatable<WriteContext>

Properties

Column

Column being written.

If HasColumn == false, or Mode != WriteColumn this will throw.

Declaration
public ColumnIdentifier Column { get; }
Property Value
Type Description
ColumnIdentifier

Context

The object, if any, provided to the call to CreateWriter or CreateAsyncWriter that produced the writer which is performing the writer operation which is described by this context.

Declaration
public object Context { get; }
Property Value
Type Description
System.Object

HasColumn

Whether or not Column is available.

Declaration
public bool HasColumn { get; }
Property Value
Type Description
System.Boolean

HasRowNumber

Whether or not RowNumber is available.

Declaration
public bool HasRowNumber { get; }
Property Value
Type Description
System.Boolean

Mode

What, precisely, a writer is doing.

Declaration
public WriteContextMode Mode { get; }
Property Value
Type Description
WriteContextMode

Options

Options used to create writer. Useful for accessing shared configurations, like MemoryPool(char).

Declaration
public Options Options { get; }
Property Value
Type Description
Options

RowNumber

The index of the row being written (0-based).

If HasRowNumber == false, or Mode is DiscoveringColumns this will throw.

Declaration
public int RowNumber { get; }
Property Value
Type Description
System.Int32

Methods

Equals(WriteContext)

Returns true if this object equals the given WriteContext.

Declaration
public bool Equals(WriteContext context)
Parameters
Type Name Description
WriteContext context
Returns
Type Description
System.Boolean

Equals(Object)

Returns true if this object equals the given WriteContext.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean

GetHashCode()

Returns a stable hash for this WriteContext.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

ToString()

Returns a string representation of this WriteContext.

Declaration
public override string ToString()
Returns
Type Description
System.String

Operators

Equality(WriteContext, WriteContext)

Compare two WriteContexts for equality

Declaration
public static bool operator ==(WriteContext a, WriteContext b)
Parameters
Type Name Description
WriteContext a
WriteContext b
Returns
Type Description
System.Boolean

Inequality(WriteContext, WriteContext)

Compare two WriteContexts for inequality

Declaration
public static bool operator !=(WriteContext a, WriteContext b)
Parameters
Type Name Description
WriteContext a
WriteContext b
Returns
Type Description
System.Boolean

Implements

System.IEquatable<>
In This Article
Back to top Generated by DocFX