C# Class indice.Edi.EdiWriter

Represents a writer that provides a fast, non-cached, forward-only way of generating Edi data.
Inheritance: IDisposable
ファイルを表示 Open project: indice-co/EDI.Net Class Usage Examples

Private Properties

Property Type Description
AutoComplete void
AutoCompleteAll void
AutoCompleteClose void
BuildStateArray State[][]
CreateUnsupportedTypeException EdiWriterException
EdiWriter System
GetCloseTokenForType EdiToken
IDisposable void
InternalWriteEnd void
InternalWriteRaw void
InternalWriteSegmentName void
InternalWriteStart void
InternalWriteValue void
InternalWriteWhitespace void
Peek EdiContainerType
Pop EdiContainerType
Push void
WriteEnd void
WriteTokenInternal void
WriteValue void

Public Methods

Method Description
Close ( ) : void

Closes this stream and the underlying stream.

Flush ( ) : void

Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.

WriteEnd ( ) : void

Writes the end of the current EDI structure.

WriteNull ( ) : void

Writes a null value.

WriteRaw ( string fragment ) : void

Writes raw EDI fragment without changing the writer's state.

WriteSegmentName ( string name ) : void

Writes the segmant name. And marks the beginning of a Segment.

WriteSegmentTerminator ( ) : void

Writes the end of a Edi EdiContainerType.Segment.

WriteServiceStringAdvice ( ) : void
WriteToken ( EdiReader reader ) : void

Writes the current EdiReader token and its children.

WriteToken ( EdiReader reader, bool writeChildren ) : void

Writes the current EdiReader token.

WriteToken ( EdiToken token ) : void

Writes the EdiToken token.

WriteToken ( EdiToken token, object value ) : void

Writes the EdiToken token and its value.

WriteValue ( DateTime value, string format ) : void

Writes a DateTime value.

WriteValue ( DateTimeOffset value, string format ) : void

Writes a DateTimeOffset value.

WriteValue ( Guid value ) : void

Writes a Guid value.

WriteValue ( TimeSpan value ) : void

Writes a TimeSpan value.

WriteValue ( Uri value ) : void

Writes a Uri value.

WriteValue ( bool value ) : void

Writes a Boolean value.

WriteValue ( byte value ) : void

Writes a Byte value.

WriteValue ( char value ) : void

Writes a Char value.

WriteValue ( decimal value, Picture picture ) : void

Writes a Decimal value.

WriteValue ( double value, Picture picture ) : void

Writes a Double value.

WriteValue ( float value, Picture picture ) : void

Writes a Single value.

WriteValue ( int value, Picture picture ) : void

Writes a Int32 value.

WriteValue ( long value, Picture picture ) : void

Writes a Int64 value.

WriteValue ( object value ) : void

Writes a Object value. An error will raised if the value cannot be written as a single Edi token.

WriteValue ( object value, Picture picture, string format ) : void

Writes a Object value. An error will raised if the value cannot be written as a single Edi token.

WriteValue ( sbyte value, Picture picture ) : void

Writes a SByte value.

WriteValue ( short value, Picture picture ) : void

Writes a Int16 value.

WriteValue ( string value, Picture picture ) : void

Writes a String value.

WriteValue ( uint value, Picture picture ) : void

Writes a UInt32 value.

WriteValue ( ulong value, Picture picture ) : void

Writes a UInt64 value.

WriteValue ( ushort value, Picture picture ) : void

Writes a UInt16 value.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

EdiWriter ( IEdiGrammar grammar ) : System

Creates an instance of the EdiWriter class.

SetWriteState ( EdiToken token, object value ) : void

Sets the state of the EdiWriter,

WriteComponentDelimiter ( ) : void

Writes an EdiContainerType.Component separator.

WriteElementDelimiter ( ) : void

Writes an EdiContainerType.Element separator.

WriteEnd ( EdiToken token ) : void

Writes the specified end token.

WriteNewLine ( ) : void

Writes indent characters.

WriteSegmentNameDelimiter ( ) : void

Writes indent characters.

Private Methods

Method Description
AutoComplete ( EdiToken tokenBeingWritten ) : void
AutoCompleteAll ( ) : void
AutoCompleteClose ( EdiContainerType type ) : void
BuildStateArray ( ) : State[][]
CreateUnsupportedTypeException ( EdiWriter writer, object value ) : EdiWriterException
EdiWriter ( ) : System
GetCloseTokenForType ( EdiContainerType type ) : EdiToken
IDisposable ( ) : void
InternalWriteEnd ( EdiContainerType container ) : void
InternalWriteRaw ( ) : void
InternalWriteSegmentName ( string name ) : void
InternalWriteStart ( EdiToken token, EdiContainerType container ) : void
InternalWriteValue ( EdiToken token ) : void
InternalWriteWhitespace ( string ws ) : void
Peek ( ) : EdiContainerType
Pop ( ) : EdiContainerType
Push ( EdiContainerType value ) : void
WriteEnd ( EdiContainerType type ) : void
WriteTokenInternal ( EdiReader reader, bool writeChildren ) : void
WriteValue ( EdiWriter writer, PrimitiveTypeCode typeCode, object value, Picture picture, string format ) : void

Method Details

Close() public method

Closes this stream and the underlying stream.
public Close ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

EdiWriter() protected method

Creates an instance of the EdiWriter class.
protected EdiWriter ( IEdiGrammar grammar ) : System
grammar IEdiGrammar
return System

Flush() public abstract method

Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
public abstract Flush ( ) : void
return void

SetWriteState() protected method

Sets the state of the EdiWriter,
protected SetWriteState ( EdiToken token, object value ) : void
token EdiToken The EdiToken being written.
value object The value being written.
return void

WriteComponentDelimiter() protected method

Writes an EdiContainerType.Component separator.
protected WriteComponentDelimiter ( ) : void
return void

WriteElementDelimiter() protected method

Writes an EdiContainerType.Element separator.
protected WriteElementDelimiter ( ) : void
return void

WriteEnd() public method

Writes the end of the current EDI structure.
public WriteEnd ( ) : void
return void

WriteEnd() protected method

Writes the specified end token.
protected WriteEnd ( EdiToken token ) : void
token EdiToken The end token to write.
return void

WriteNewLine() protected method

Writes indent characters.
protected WriteNewLine ( ) : void
return void

WriteNull() public method

Writes a null value.
public WriteNull ( ) : void
return void

WriteRaw() public method

Writes raw EDI fragment without changing the writer's state.
public WriteRaw ( string fragment ) : void
fragment string A raw EDI fragment to write.
return void

WriteSegmentName() public method

Writes the segmant name. And marks the beginning of a Segment.
public WriteSegmentName ( string name ) : void
name string The name of the segment.
return void

WriteSegmentNameDelimiter() protected method

Writes indent characters.
protected WriteSegmentNameDelimiter ( ) : void
return void

WriteSegmentTerminator() public method

Writes the end of a Edi EdiContainerType.Segment.
public WriteSegmentTerminator ( ) : void
return void

WriteServiceStringAdvice() public method

public WriteServiceStringAdvice ( ) : void
return void

WriteToken() public method

Writes the current EdiReader token and its children.
public WriteToken ( EdiReader reader ) : void
reader EdiReader The to read the token from.
return void

WriteToken() public method

Writes the current EdiReader token.
public WriteToken ( EdiReader reader, bool writeChildren ) : void
reader EdiReader The to read the token from.
writeChildren bool A flag indicating whether the current token's children should be written.
return void

WriteToken() public method

Writes the EdiToken token.
public WriteToken ( EdiToken token ) : void
token EdiToken The to write.
return void

WriteToken() public method

Writes the EdiToken token and its value.
public WriteToken ( EdiToken token, object value ) : void
token EdiToken The to write.
value object /// The value to write. /// A value is only required for tokens that have an associated value, e.g. the segmanet name name for . /// A null value can be passed to the method for token's that don't have a value, e.g. .
return void

WriteValue() public method

Writes a DateTime value.
public WriteValue ( DateTime value, string format ) : void
value DateTime The value to write.
format string
return void

WriteValue() public method

Writes a DateTimeOffset value.
public WriteValue ( DateTimeOffset value, string format ) : void
value DateTimeOffset The value to write.
format string
return void

WriteValue() public method

Writes a Guid value.
public WriteValue ( Guid value ) : void
value Guid The value to write.
return void

WriteValue() public method

Writes a TimeSpan value.
public WriteValue ( TimeSpan value ) : void
value TimeSpan The value to write.
return void

WriteValue() public method

Writes a Uri value.
public WriteValue ( Uri value ) : void
value Uri The value to write.
return void

WriteValue() public method

Writes a Boolean value.
public WriteValue ( bool value ) : void
value bool The value to write.
return void

WriteValue() public method

Writes a Byte value.
public WriteValue ( byte value ) : void
value byte The value to write.
return void

WriteValue() public method

Writes a Char value.
public WriteValue ( char value ) : void
value char The value to write.
return void

WriteValue() public method

Writes a Decimal value.
public WriteValue ( decimal value, Picture picture ) : void
value decimal The value to write.
picture Picture
return void

WriteValue() public method

Writes a Double value.
public WriteValue ( double value, Picture picture ) : void
value double The value to write.
picture Picture
return void

WriteValue() public method

Writes a Single value.
public WriteValue ( float value, Picture picture ) : void
value float The value to write.
picture Picture
return void

WriteValue() public method

Writes a Int32 value.
public WriteValue ( int value, Picture picture ) : void
value int The value to write.
picture Picture
return void

WriteValue() public method

Writes a Int64 value.
public WriteValue ( long value, Picture picture ) : void
value long The value to write.
picture Picture
return void

WriteValue() public method

Writes a Object value. An error will raised if the value cannot be written as a single Edi token.
public WriteValue ( object value ) : void
value object The value to write.
return void

WriteValue() public method

Writes a Object value. An error will raised if the value cannot be written as a single Edi token.
public WriteValue ( object value, Picture picture, string format ) : void
value object The value to write.
picture Picture
format string traditional string format mask
return void

WriteValue() public method

Writes a SByte value.
public WriteValue ( sbyte value, Picture picture ) : void
value sbyte The value to write.
picture Picture
return void

WriteValue() public method

Writes a Int16 value.
public WriteValue ( short value, Picture picture ) : void
value short The value to write.
picture Picture
return void

WriteValue() public method

Writes a String value.
public WriteValue ( string value, Picture picture ) : void
value string The value to write.
picture Picture
return void

WriteValue() public method

Writes a UInt32 value.
public WriteValue ( uint value, Picture picture ) : void
value uint The value to write.
picture Picture
return void

WriteValue() public method

Writes a UInt64 value.
public WriteValue ( ulong value, Picture picture ) : void
value ulong The value to write.
picture Picture
return void

WriteValue() public method

Writes a UInt16 value.
public WriteValue ( ushort value, Picture picture ) : void
value ushort The value to write.
picture Picture
return void