Show / Hide Table of Contents

Class WriterBase

Base class for writing files.

Inheritance
Object
WriterBase
CsvWriter
Inherited Members
System.Object.ToString()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Namespace: IRM.Data
Assembly: IRM.dll
Syntax
public abstract class WriterBase : IDisposable

Fields

Disposed

A value indicating if the writer has been disposed.

Declaration
protected bool Disposed
Field Value
Boolean

Encoding

Gets or sets the Encoding to use when writing the file.

Declaration
protected Encoding Encoding
Field Value
System.Text.Encoding

FileName

Gets or sets the name of the file.

Declaration
protected string FileName
Field Value
String

Initialized

A value indicating if the writer is initialized.

Declaration
protected bool Initialized
Field Value
Boolean

OutputStream

The System.IO.TextWriter used by the writer.

Declaration
protected TextWriter OutputStream
Field Value
System.IO.TextWriter

Properties

DefaultCultureInfo

Gets or sets the default System.Globalization.CultureInfo to use then formatting values.

Declaration
public CultureInfo DefaultCultureInfo { get; set; }
Property Value
System.Globalization.CultureInfo

NumberOfRecordsWritten

Gets or sets the number of records written.

Declaration
public int NumberOfRecordsWritten { get; set; }
Property Value
System.Int32

The number of records written.

Methods

CheckDisposed()

Checks to see if object has already been disposed, which would make calling methods on the object invalid.

Declaration
protected void CheckDisposed()
Exceptions
System.ObjectDisposedException

Methods were called after the object has been disposed.

Close()

Closes and releases all related resources.

Declaration
public void Close()

Dispose(Boolean)

Releases the unmanaged resources used by this instance and optionally releases the managed resources.

Declaration
protected abstract void Dispose(bool disposing)
Parameters
Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Finalize()

Finalizes an instance of the of the WriterBase class.

Declaration
protected void Finalize()

Flush()

Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.

Declaration
public void Flush()

Init()

Initializes the output stream by opening a file using the passed in file name from the constructor if the output stream has not been initialized.

Declaration
protected void Init()

Explicit Interface Implementations

IDisposable.Dispose()

Closes and releases all related resources.

Declaration
void IDisposable.Dispose()
Implements
System.IDisposable.Dispose()

Extension Methods

ObjectExtensions.DeepClone<T>(T)
AnnotationsExtensions.IsValid(Object)
Back to top Generated by DocFX