コード例 #1
0
            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));
            }
コード例 #2
0
            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));
            }