The ToClientSideMainConverter class is the main entry point for converting server-side objects into client-side values. More specifically, it provides the following functionnalities:

  • Recursively go through the composition graph of any cso-compatible object and generate a string of javascript code that, when evaluated, create an equivalent client-side value.
  • Provides the to-client-side conversion functionalities for types corresponding to cso-types (cso-generated types and cso-native types).
  • Provides the to-client-side conversion functionalities for .NET primitive types and many other commonly .NET types like System.DateTime and System.Array.

Here an exaustive list of the .NET types handled by this class

.NET primitive data types
TYPEJAVASCRIPT TYPECOMMENTS
System.BooleanBoolean-
System.ByteNumber-
System.SByteNumber-
System.Int16Number-
System.UInt16Number-
System.Int32Number-
System.UInt32Number-
System.Int64NumberRange limited. See ExceptionOnPrecisionLossInt64
System.UInt64NumberRange limited. See ExceptionOnPrecisionLossUInt64
System.CharString-
System.DoubleNumber-
System.SingleNumber-

Common data structure in .NET
TYPEJAVASCRIPT TYPECOMMENTS
System.StringString-
System.ArrayArrayN-dimensional arrays are supported. Contructor of Array core object is used.
System.DateTimeDateDate is a javacript predefined core object not a data type. Underlying data type is Number.
System.DecimalNumberRange limited. See ExceptionOnPrecisionLossDecimal

Special cases
TYPEJAVASCRIPT TYPECOMMENTS
#any null reference#NullNull is a javascript 'Special Type'

Namespace:  ca.metaobjects.csogateway
Assembly:  ca.metaobjects.csogateway (in ca.metaobjects.csogateway.dll) Version: 0.7.1.0 (0.7.1.0)

Syntax

C#
public class ToClientSideMainConverter : IToClientSideConverter
Visual Basic (Declaration)
Public Class ToClientSideMainConverter _
	Implements IToClientSideConverter
Visual C++
public ref class ToClientSideMainConverter : IToClientSideConverter

Inheritance Hierarchy

System..::.Object
  ca.metaobjects.csogateway..::.ToClientSideMainConverter

See Also