File: Categories.cs

package info (click to toggle)
libflickrnet 25277-6
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 628 kB
  • ctags: 1,355
  • sloc: cs: 7,136; makefile: 24; sh: 13; ansic: 6
file content (80 lines) | stat: -rw-r--r-- 2,424 bytes parent folder | download | duplicates (4)
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
71
72
73
74
75
76
77
78
79
80
using System.Xml.Serialization;
using System.Xml.Schema;

namespace FlickrNet
{
	/// <summary>
	/// Contains details of a category, including groups belonging to the category and sub categories.
	/// </summary>
	[System.Serializable]
	public class Category
	{
		/// <summary>
		/// The name for the category.
		/// </summary>
		[XmlAttribute("name", Form=XmlSchemaForm.Unqualified)]
		public string CategoryName;
    
		/// <summary>
		/// A forward slash delimited list of the parents of the current group.
		/// </summary>
		/// <remarks>
		/// Can be matched against the list of PathIds to jump directly to a parent group.
		/// </remarks>
		/// <example>
		/// Group Id 91, Romance will return "/Life/Romance" as the Path and "/90/91" as its PathIds
		/// </example>
		[XmlAttribute("path", Form=XmlSchemaForm.Unqualified)]
		public string Path;
    
		/// <summary>
		/// A forward slash delimited list of the ids of the parents of the current group.
		/// </summary>
		/// <remarks>
		/// Can be matched against the Path to jump directly to a parent group.
		/// </remarks>
		/// <example>
		/// Group Id 91, Romance will return "/Life/Romance" as the Path and "/90/91" as its PathIds
		/// </example>
		[XmlAttribute("pathids", Form=XmlSchemaForm.Unqualified)]
		public string PathIds;

		/// <summary>
		/// An array of <see cref="SubCategory"/> items.
		/// </summary>
		[XmlElement("subcat", Form=XmlSchemaForm.Unqualified)]
		public SubCategory[] SubCategories;

		/// <summary>
		/// An array of <see cref="Group"/> items, listing the groups within this category.
		/// </summary>
		[XmlElement("group", Form=XmlSchemaForm.Unqualified)]
		public Group[] Groups;
	}

	/// <summary>
	/// Holds details of a sub category, including its id, name and the number of groups in it.
	/// </summary>
	[System.Serializable]
	public class SubCategory
	{
		/// <summary>
		/// The id of the category.
		/// </summary>
		[XmlAttribute("id", Form=XmlSchemaForm.Unqualified)]
		public long SubCategoryId;
    
		/// <summary>
		/// The name of the category.
		/// </summary>
		[XmlAttribute("name", Form=XmlSchemaForm.Unqualified)]
		public string SubCategoryName;
    
		/// <summary>
		/// The number of groups found within the category.
		/// </summary>
		[XmlAttribute("count", Form=XmlSchemaForm.Unqualified)]
		public long GroupCount;
	}

}