-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathViewModel.cs
41 lines (36 loc) · 1.1 KB
/
ViewModel.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
//! \file ViewModel.cs
//! \date Mon Aug 11 00:54:34 2014
//! \brief vnrec view model implementation.
//
using System;
namespace VNRec
{
public class Recommendation
{
public string Title { get; private set; }
public double Score { get; private set; }
public string Uri { get; private set; }
public Recommendation (Tuple<int, double> rec)
{
VNDB.Entry novel;
if (VNDB.VNDBCache.Games.TryGetValue (rec.Item1, out novel))
Title = novel.Title;
else
Title = "v"+rec.Item1.ToString();
Score = rec.Item2;
Uri = string.Format ("http://vndb.org/v{0}", rec.Item1);
}
}
public class SimilarUser
{
public string Name { get; private set; }
public string Uri { get; private set; }
public int Id { get; private set; }
public SimilarUser (int user_id)
{
Id = user_id;
Uri = string.Format ("http://vndb.org/u{0}", user_id);
Name = string.Format ("u{0}", user_id);
}
}
}