JsonExSerializer.JsonWriter Class Reference

Inherits JsonExSerializer.IJsonWriter.

Inherited by JsonExSerializer.SerializerHelper.

List of all members.

Public Member Functions

 JsonWriter (TextWriter writer, bool indent)
IJsonWriter ConstructorStart (string NamespaceAndClass)
 Starts a constructed object with the given type information.
IJsonWriter ConstructorStart (string NamespaceAndClass, string Assembly)
 Starts a constructed object.
IJsonWriter ConstructorStart (Type constructorType)
 Starts a constructed object.
IJsonWriter ConstructorArgsStart ()
 Starts the arguments for a constructed object.
IJsonWriter ConstructorArgsEnd ()
 Ends the arguments for a constructed object.
IJsonWriter ConstructorEnd ()
 Ends the constructed object.
IJsonWriter ObjectStart ()
 Starts an object.
IJsonWriter Key (string key)
IJsonWriter ObjectEnd ()
 Ends an object definition.
IJsonWriter ArrayStart ()
 Starts an array sequence.
IJsonWriter ArrayEnd ()
 Ends an array.
IJsonWriter Value (bool value)
 Writes a boolean value.
IJsonWriter Value (long value)
 Writes a long value.
IJsonWriter Value (double value)
 Writes a double value.
IJsonWriter Value (float value)
 Writes a float value.
IJsonWriter QuotedValue (string value)
 Writes a quoted value.
IJsonWriter SpecialValue (string value)
 Writes a special string value that is not quoted such as null, or some other keyword.
IJsonWriter Comment (string comment)
 Writes a comment. The comment characters /*.
IJsonWriter Cast (Type castedType)
 Writes an object cast (MyClass) ...
IJsonWriter Cast (string NamespaceAndClass)
 Writes an object cast with the type name specified as a string. The NamespaceAndClass contains the class name and possibly the Namespace but no assembly. (MyNamespace.MyClass) ...
IJsonWriter Cast (string NamespaceAndClass, string Assembly)
 Writes an object cast with the fully qualified type name and assemble reference ("MyNamespace.MyClass, MyAssembly") ...
abstract IJsonWriter WriteObject (object value)
 Serializes any type of object completely.
void Dispose ()

Protected Types

enum  OpType

Protected Member Functions

void WriteIndent ()
void WriteLineBreak ()
void WriteQuotedString (string value)
void WriteEscapedString (string s)
abstract void WriteTypeInfo (Type t)
 Writes out the type for an object in regular C# code syntax.
virtual void WriteTypeInfo (string NamespaceAndClass)
 Writes out the type info specified by the NamespaceAndClass string.
virtual void WriteTypeInfo (string NamespaceAndClass, string assembly)
 Writes out the type info specified by the NamespaceAndClass string and assembly.

Protected Attributes

TextWriter _writer
short indentLevel = 0
short indentSize = 4

Classes

class  ArrayState
 State when an array is in progress.
class  CtorArgsState
 State when an constructor args are in progress.
class  CtorState
 State when a constructor is in progress.
class  DoneState
class  InitialState
 The initial state of the writer.
interface  IState
class  KeyState
class  ObjectState
 State when a javascript object is in progress.
class  StateBase
 Base class for states, implements helper functions for transitions.


Member Enumeration Documentation

enum JsonExSerializer::JsonWriter::OpType [protected]

Enumerator:
CtorStart 
CtorArgStart 
CtorArgEnd 
CtorEnd 
ObjStart 
ObjEnd 
ArrStart 
ArrEnd 
OpKey 
OpValue 
OpCast 


Constructor & Destructor Documentation

JsonExSerializer.JsonWriter.JsonWriter ( TextWriter  writer,
bool  indent 
)


Member Function Documentation

void JsonExSerializer.JsonWriter.WriteIndent (  )  [protected]

void JsonExSerializer.JsonWriter.WriteLineBreak (  )  [protected]

IJsonWriter JsonExSerializer.JsonWriter.ConstructorStart ( string  NamespaceAndClass  ) 

Starts a constructed object with the given type information.

Parameters:
NamespaceAndClass The fully-qualified class name without assembly reference
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.ConstructorStart ( string  NamespaceAndClass,
string  Assembly 
)

Starts a constructed object.

Parameters:
NamespaceAndClass The fully-qualified class name without assembly reference
Assembly The assembly name
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.ConstructorStart ( Type  constructorType  ) 

Starts a constructed object.

Parameters:
constructorType 
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.ConstructorArgsStart (  ) 

Starts the arguments for a constructed object.

Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.ConstructorArgsEnd (  ) 

Ends the arguments for a constructed object.

Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.ConstructorEnd (  ) 

Ends the constructed object.

Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.ObjectStart (  ) 

Starts an object.

Returns:
the writer instance for stacking

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.Key ( string  key  ) 

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.ObjectEnd (  ) 

Ends an object definition.

Returns:
the writer instance for stacking

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.ArrayStart (  ) 

Starts an array sequence.

Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.ArrayEnd (  ) 

Ends an array.

Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.Value ( bool  value  ) 

Writes a boolean value.

Parameters:
value 
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.Value ( long  value  ) 

Writes a long value.

Parameters:
value 
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.Value ( double  value  ) 

Writes a double value.

Parameters:
value 
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.Value ( float  value  ) 

Writes a float value.

Parameters:
value 
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.QuotedValue ( string  value  ) 

Writes a quoted value.

Parameters:
value 
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.SpecialValue ( string  value  ) 

Writes a special string value that is not quoted such as null, or some other keyword.

Parameters:
value the value to write
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.Comment ( string  comment  ) 

Writes a comment. The comment characters /*.

Implements JsonExSerializer.IJsonWriter.

void JsonExSerializer.JsonWriter.WriteQuotedString ( string  value  )  [protected]

void JsonExSerializer.JsonWriter.WriteEscapedString ( string  s  )  [protected]

abstract void JsonExSerializer.JsonWriter.WriteTypeInfo ( Type  t  )  [protected, pure virtual]

Writes out the type for an object in regular C# code syntax.

Parameters:
t the type to write

Implemented in JsonExSerializer.SerializerHelper.

virtual void JsonExSerializer.JsonWriter.WriteTypeInfo ( string  NamespaceAndClass  )  [protected, virtual]

Writes out the type info specified by the NamespaceAndClass string.

Parameters:
NamespaceAndClass the fully-qualified type with namespace and class, but not assembly

virtual void JsonExSerializer.JsonWriter.WriteTypeInfo ( string  NamespaceAndClass,
string  assembly 
) [protected, virtual]

Writes out the type info specified by the NamespaceAndClass string and assembly.

Parameters:
NamespaceAndClass the fully-qualified type with namespace and class, but not assembly
assembly The assembly for the type

IJsonWriter JsonExSerializer.JsonWriter.Cast ( Type  castedType  ) 

Writes an object cast (MyClass) ...

Parameters:
castedType The type for the cast
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.Cast ( string  NamespaceAndClass  ) 

Writes an object cast with the type name specified as a string. The NamespaceAndClass contains the class name and possibly the Namespace but no assembly. (MyNamespace.MyClass) ...

Parameters:
NamespaceAndClass The fully-qualified class name without assembly reference
Returns:

Implements JsonExSerializer.IJsonWriter.

IJsonWriter JsonExSerializer.JsonWriter.Cast ( string  NamespaceAndClass,
string  Assembly 
)

Writes an object cast with the fully qualified type name and assemble reference ("MyNamespace.MyClass, MyAssembly") ...

Parameters:
NamespaceAndClass The fully-qualified class name without assembly reference
Assembly The assembly name
Returns:

Implements JsonExSerializer.IJsonWriter.

abstract IJsonWriter JsonExSerializer.JsonWriter.WriteObject ( object  value  )  [pure virtual]

Serializes any type of object completely.

Parameters:
value the object to write
Returns:
json writer

Implements JsonExSerializer.IJsonWriter.

Implemented in JsonExSerializer.SerializerHelper.

void JsonExSerializer.JsonWriter.Dispose (  ) 


Member Data Documentation

TextWriter JsonExSerializer.JsonWriter._writer [protected]

short JsonExSerializer.JsonWriter.indentLevel = 0 [protected]

short JsonExSerializer.JsonWriter.indentSize = 4 [protected]


Generated on Fri Feb 15 23:33:58 2008 for JsonExSerializer by  doxygen 1.5.2