internal static Unserializable Create() { // Loops throw off every serializer ;). var o = new Unserializable(); o.Child = o; return(o); }
static void Main() { var u = new Unserializable { Age = 40, ID = 2, Name = "Betty" }; var jser = new JavaScriptSerializer(); var jsonText = jser.Serialize(u); // next line outputs {"Age":40,"ID":2,"Name":"Betty"} Console.WriteLine(jsonText); }
public async Task CallWithUnserializableObject() { await Clients.All.SendAsync("Foo", Unserializable.Create()); }
public Unserializable GetUnserializableObject() { return(Unserializable.Create()); }