File: PhotoCounts.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 (62 lines) | stat: -rw-r--r-- 1,635 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
using System;
using System.Xml.Serialization;
using System.Xml.Schema;

namespace FlickrNet
{
	/// <summary>
	/// The information about the number of photos a user has.
	/// </summary>
	[System.Serializable]
	public class PhotoCounts
	{
		/// <summary>
		/// An array of <see cref="PhotoCountInfo"/> instances. Null if no counts returned.
		/// </summary>
		[XmlElement("photocount", Form=XmlSchemaForm.Unqualified)]
		public PhotoCountInfo[] PhotoCountInfoCollection = new PhotoCountInfo[0];
	}

	/// <summary>
	/// The specifics of a particular count.
	/// </summary>
	[System.Serializable]
	public class PhotoCountInfo
	{
		/// <summary>Total number of photos between the FromDate and the ToDate.</summary>
		/// <remarks/>
		[XmlAttribute("count", Form=XmlSchemaForm.Unqualified)]
		public int PhotoCount;
    
		/// <summary>The From date as a <see cref="DateTime"/> object.</summary>
		[XmlIgnore()]
		public DateTime FromDate
		{
			get 
			{
				return Utils.UnixTimestampToDate(fromdate_raw);
			}
		}

		/// <summary>The To date as a <see cref="DateTime"/> object.</summary>
		[XmlIgnore()]
		public DateTime ToDate
		{
			get 
			{
				return Utils.UnixTimestampToDate(todate_raw);
			}
		}

		/// <summary>The original from date in unix timestamp format.</summary>
		/// <remarks/>
		[XmlAttribute("fromdate", Form=XmlSchemaForm.Unqualified)]
		public string fromdate_raw;
    
		/// <summary>The original to date in unix timestamp format.</summary>
		/// <remarks/>
		[XmlAttribute("todate", Form=XmlSchemaForm.Unqualified)]
		public string todate_raw;

	}
}