-
Notifications
You must be signed in to change notification settings - Fork 0
/
GroupInfoRestrictions.cs
70 lines (59 loc) · 1.98 KB
/
GroupInfoRestrictions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Type: FlickrNet.GroupInfoRestrictions
// Assembly: FlickrNet, Version=3.10.0.0, Culture=neutral, PublicKeyToken=2491df59efa5d132
// MVID: 8B8C756F-D5B2-4047-8A8B-B1C1E877A2EF
// Assembly location: D:\RMCK\vs\2014.05.24_FlickrAPI\FlickrNet.dll
using System.Xml;
namespace FlickrNet
{
public sealed class GroupInfoRestrictions : IFlickrParsable
{
public bool PhotosAccepted { get; set; }
public bool VideosAccepted { get; set; }
public bool ImagesAccepted { get; set; }
public bool ScreenshotsAccepted { get; set; }
public bool ArtIllustrationsAccepted { get; set; }
public bool SafeItemsAccepted { get; set; }
public bool ModeratedItemsAccepted { get; set; }
public bool RestrictedItemsAccepted { get; set; }
public bool GeoInfoRequired { get; set; }
void IFlickrParsable.Load(XmlReader reader)
{
while (reader.MoveToNextAttribute())
{
switch (reader.LocalName)
{
case "photos_ok":
this.PhotosAccepted = reader.Value == "1";
continue;
case "videos_ok":
this.VideosAccepted = reader.Value == "1";
continue;
case "images_ok":
this.ImagesAccepted = reader.Value == "1";
continue;
case "screens_ok":
this.ScreenshotsAccepted = reader.Value == "1";
continue;
case "art_ok":
this.ArtIllustrationsAccepted = reader.Value == "1";
continue;
case "safe_ok":
this.SafeItemsAccepted = reader.Value == "1";
continue;
case "moderate_ok":
this.ModeratedItemsAccepted = reader.Value == "1";
continue;
case "resitricted_ok":
this.RestrictedItemsAccepted = reader.Value == "1";
continue;
case "has_geo":
this.GeoInfoRequired = reader.Value == "1";
continue;
default:
continue;
}
}
reader.Read();
}
}
}