コード例 #1
0
        void IFlickrParsable.Load(System.Xml.XmlReader reader)
        {
            reader.Read();

            while (reader.LocalName != "auth" && reader.LocalName != "oauth")
            {
                switch (reader.LocalName)
                {
                case "token":
                    Token = reader.ReadElementContentAsString();
                    break;

                case "perms":
                    Permissions = (AuthLevel)Enum.Parse(typeof(AuthLevel), reader.ReadElementContentAsString(), true);
                    break;

                case "user":
                    User = new FoundUser();
                    ((IFlickrParsable)User).Load(reader);
                    break;

                default:
                    UtilityMethods.CheckParsingException(reader);
                    reader.Skip();
                    break;
                }
            }
        }
コード例 #2
0
ファイル: Auth.cs プロジェクト: Gevornairi/FlickrClient
        void IFlickrParsable.Load(System.Xml.XmlReader reader)
        {
            reader.Read();

            while (reader.LocalName != "auth" && reader.LocalName != "oauth")
            {
                switch (reader.LocalName)
                {
                    case "token":
                        Token = reader.ReadElementContentAsString();
                        break;
                    case "perms":
                        Permissions = (AuthLevel)Enum.Parse(typeof(AuthLevel), reader.ReadElementContentAsString(), true);
                        break;
                    case "user":
                        User = new FoundUser();
                        ((IFlickrParsable)User).Load(reader);
                        break;
                    default:
                        UtilityMethods.CheckParsingException(reader);
                        reader.Skip();
                        break;
                }
            }
        }