C# Class indice.Edi.EdiWriter

Represents a writer that provides a fast, non-cached, forward-only way of generating Edi data.
Inheritance: IDisposable
Afficher le fichier Open project: indice-co/EDI.Net Class Usage Examples

Private Properties

Свойство 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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

Closes this stream and the underlying stream.
public Close ( ) : void
Résultat void

Dispose() protected méthode

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.
Résultat void

EdiWriter() protected méthode

Creates an instance of the EdiWriter class.
protected EdiWriter ( IEdiGrammar grammar ) : System
grammar IEdiGrammar
Résultat System

Flush() public abstract méthode

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

SetWriteState() protected méthode

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.
Résultat void

WriteComponentDelimiter() protected méthode

Writes an EdiContainerType.Component separator.
protected WriteComponentDelimiter ( ) : void
Résultat void

WriteElementDelimiter() protected méthode

Writes an EdiContainerType.Element separator.
protected WriteElementDelimiter ( ) : void
Résultat void

WriteEnd() public méthode

Writes the end of the current EDI structure.
public WriteEnd ( ) : void
Résultat void

WriteEnd() protected méthode

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

WriteNewLine() protected méthode

Writes indent characters.
protected WriteNewLine ( ) : void
Résultat void

WriteNull() public méthode

Writes a null value.
public WriteNull ( ) : void
Résultat void

WriteRaw() public méthode

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

WriteSegmentName() public méthode

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

WriteSegmentNameDelimiter() protected méthode

Writes indent characters.
protected WriteSegmentNameDelimiter ( ) : void
Résultat void

WriteSegmentTerminator() public méthode

Writes the end of a Edi EdiContainerType.Segment.
public WriteSegmentTerminator ( ) : void
Résultat void

WriteServiceStringAdvice() public méthode

public WriteServiceStringAdvice ( ) : void
Résultat void

WriteToken() public méthode

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

WriteToken() public méthode

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.
Résultat void

WriteToken() public méthode

Writes the EdiToken token.
public WriteToken ( EdiToken token ) : void
token EdiToken The to write.
Résultat void

WriteToken() public méthode

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. .
Résultat void

WriteValue() public méthode

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

WriteValue() public méthode

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

WriteValue() public méthode

Writes a Guid value.
public WriteValue ( Guid value ) : void
value Guid The value to write.
Résultat void

WriteValue() public méthode

Writes a TimeSpan value.
public WriteValue ( TimeSpan value ) : void
value TimeSpan The value to write.
Résultat void

WriteValue() public méthode

Writes a Uri value.
public WriteValue ( Uri value ) : void
value Uri The value to write.
Résultat void

WriteValue() public méthode

Writes a Boolean value.
public WriteValue ( bool value ) : void
value bool The value to write.
Résultat void

WriteValue() public méthode

Writes a Byte value.
public WriteValue ( byte value ) : void
value byte The value to write.
Résultat void

WriteValue() public méthode

Writes a Char value.
public WriteValue ( char value ) : void
value char The value to write.
Résultat void

WriteValue() public méthode

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

WriteValue() public méthode

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

WriteValue() public méthode

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

WriteValue() public méthode

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

WriteValue() public méthode

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

WriteValue() public méthode

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.
Résultat void

WriteValue() public méthode

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
Résultat void

WriteValue() public méthode

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

WriteValue() public méthode

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

WriteValue() public méthode

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

WriteValue() public méthode

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

WriteValue() public méthode

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

WriteValue() public méthode

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