FluorineFx .NET

Type conversion

Deserialization

The table below shows the type conversions from the received ActionScript type to .NET type

ActionScript Type AS2/AMF0 ActionScript Type AS3/AMF3 .NET Type

undefined/null

undefined/null

null

Number

Number

Byte, SByte, UInt16, Int16, UInt32, Int32, UInt64, Int64, Decimal, Single, Double
Enum

---

int

Byte, SByte, UInt16, Int16, UInt32, Int32, UInt64, Int64, Decimal, Single, Double
Enum

Boolean

Boolean

System.Boolean

Date

Date

System.DateTime

String

String

String
Char
Guid
Enum

XML

XML

System.Xml.XmlDocument

Array

Array

Array
IList
System.Collections.ArrayList

Associative Array

Associative Array

System.Collections.Hashtable

---

mx.collections.ArrayCollection

FluorineFx.AMF3.ArrayCollection

---

flash.utils.ByteArray

byte[]
FluorineFx.AMF3.ByteArray

Object

Object

FluorineFx.ASObject (Hashtable)
.NET typed object with a constructor that takes no parameters

Note: additionally if a TypeConverter is available it can further adapt the received value

 

Serialization

The table below shows the type conversions for .NET types to ActionScript types

.NET Type ActionScript Type AS2/AMF0 ActionScript Type AS3/AMF3

null
DBNull
System.Data.SqlTypes.INullable(when IsNull = true)

null

null

Byte/SByte
UInt16/Int16
UInt32/Int32
SqlByte
SqlInt16
SqlInt32

Number

int

UInt64/Int64
Decimal
Single
Double
SqlInt64
SqlSingle
SqlDouble
SqlDecimal
SqlMoney

Number

Number

System.Enum

Number

Number

System.Boolean
SqlBoolean

Boolean

Boolean

System.DateTime
SqlDateTime

Date

Date

System.String
System.Char
SqlString

String

String

System.Guid
SqlGuid

String

String

System.Xml.XmlDocument

XML

XML

System.Array

Array

Array

System.Collections.IList

Array

Array (when "useLegacyCollection" is set)
mx.collections.ArrayCollection

System.Collections.Hashtable
System.Collections.IDictionary

Object (untyped)

Object (untyped)

System.Data.DataTable

RecordSet

DataTable Object(ASObject)

Sytem.Data.DataSet

Associative array of RecordSet objects

Associative array of DataTable objects(ASObject)

FluorineFx.ASObject
System.Exception

Object

Object

FluorineFx.AMF3.IExternalizable

---

A typed object implementing flash.utils.IExternalizable

FluorineFx.ASObject with Type property set
any other type

Typed Object/Object

Typed Object/Object

FluorineFx.AMF3.ByteArray

---

flash.utils.ByteArray

 

References

Adobe Livedocs