summaryrefslogtreecommitdiff
path: root/SpacesToDasBlog/trunk/src/app/SpacesToDasBlog.Console/SpacesEntry.cs
blob: fb57b459a4799c072f5bc9bf1b5c095e9a3b14d3 (plain)
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
using System;
using System.Collections.Generic;
using MetaWeblogApi;

namespace SpacesToDasBlog.ConsoleUI {
	internal class SpacesEntry : ISpacesEntry {
		public SpacesEntry( Post post )
			: this( post.postid, post.title, post.description, post.dateCreated, post.categories ) {}

		public SpacesEntry( string postid, string title, string description, DateTime dateCreated, string[] categories ) {
			_id = postid;
			_title = title;
			_body = description;
			_dateCreated = dateCreated;
			_categories = new List< string >( categories );
		}

		public string Id {
			get { return _id; }
		}

		public string Title {
			get { return _title; }
		}

		public string Body {
			get { return _body; }
		}

		public DateTime DateCreated {
			get { return _dateCreated; }
		}

		public IList< string > Categories {
			get { return _categories; }
		}

		private readonly string _id;
		private readonly string _title;
		private readonly string _body;
		private readonly DateTime _dateCreated;
		private readonly IList< string > _categories;
	}
}