public ChildConvertibleObject FromMValue(IMValueReader reader) { if (reader.Peek() == MValueReaderToken.Nil) { return(null); } reader.BeginObject(); string test = null; while (reader.HasNext()) { switch (reader.NextName()) { case "test": test = reader.NextString(); break; default: reader.SkipValue(); break; } } reader.EndObject(); return(test == null ? null : new ChildConvertibleObject(test)); }
public ConvertibleObject FromMValue(IMValueReader reader) { reader.BeginObject(); string test = null; List <ConvertibleObject> list = null; while (reader.HasNext()) { switch (reader.NextName()) { case "test": test = reader.NextString(); break; case "list": list = listAdapter.FromMValue(reader); break; default: reader.SkipValue(); break; } } reader.EndObject(); return(test == null ? null : new ConvertibleObject(test, list)); }