-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
29 lines (26 loc) · 967 Bytes
/
Program.cs
File metadata and controls
29 lines (26 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AmfData
{
class Program
{
static void Main(string[] args)
{
Dictionary<string, object> srcData = new Dictionary<string, object>();
srcData["test"] = 123;
srcData["array"] = new string[] { "a", "b", "c" };
byte[] buf0 = CAmf0Helper.GetBytes(srcData);
Console.WriteLine("Amf0: {0}", BitConverter.ToString(buf0));
object readBack0 = CAmf0Helper.GetObject(buf0);
Console.WriteLine("decode: {0}", readBack0.ToString());
Console.WriteLine();
byte[] buf3 = CAmf3Helper.GetBytes(srcData);
Console.WriteLine("Amf3: {0}", BitConverter.ToString(buf3));
object readBack3 = CAmf3Helper.GetObject(buf3);
Console.WriteLine("decode: {0}", readBack3.ToString());
Console.WriteLine();
}
}
}