TestDataTypes up and running!!!
I have just finished what I might call version 0.0.1 of the .NET SWX Assembler.
This implements output of all the ActionScript types through a limited subset of the data types supported by the .NET framework. Listed in the table at the bottom of this post are the supported types and their associated ActionScript types.
So with all that said it does mean that I can now point the TestDataTypes.swf at my SWX.NET gateway and all the types return correctly!!!

Milestone No.1 me thinks :)
Now that I have this limited (but importantly working) Assembler I can start working on the input (JSON parsing) for putting requests through the gateway. The reason I am choosing to proceed in this manner is two fold:
1) I think it is more important at this stage to get a working SWX.NET gateway even if service classes have to return one of a specific list of types rather than spend forever implementing type conversions for all the .NET types.
2) I’m not sure as to the best way to procede with writing conversions for *all* the types.
| .NET Type | ActionScript Type | |
|---|---|---|
| System.Boolean | Boolean | |
| System.String | String | |
| System.Int32 | Number | |
| System.Int16 | Number | |
| System.Int | Number | |
| System.Double | Number | |
| System.Single | Number | |
| System.Collections.Hashtable | Object | |
| System.Collections.ArrayList | Array | |
| SWX.DataTypes.NullValue | null |
What is SWX.DataTypes.NullValue?
This is a little class I put together to represent the ActionScript NULL value as my assembler doesn’t like trying to parse the C# null into SWF bytecode so NullValue.ToString() returns “02” (null in SWF bytecode).