public void WriteDataAsync(AmfWriter writer, object obj) { IDictionary <string, object> dictionary; IEnumerable enumerable; if ((dictionary = obj as IDictionary <string, object>) != null) { // method writes type marker writer.WriteAmf0AssociativeArrayAsync(dictionary); } else if ((enumerable = obj as IEnumerable) != null) { writer.WriteMarkerAsync(Amf0TypeMarkers.StrictArray); writer.WriteAmf0ArrayAsync(enumerable.Cast <object>().ToArray()); } else { // method writes type marker writer.WriteAmf0TypedObjectAsync(obj); } }
public void WriteDataAsync(AmfWriter writer, object obj) { writer.WriteMarkerAsync(Amf0TypeMarkers.StrictArray); writer.WriteAmf0ArrayAsync(obj as Array); }