-
Notifications
You must be signed in to change notification settings - Fork 1
/
Game.cs
38 lines (35 loc) · 1.14 KB
/
Game.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
using System;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.Xml.Serialization;
using Newtonsoft.Json;
using Tennis_Open_Data_Standards.Attributes;
namespace Tennis_Open_Data_Standards
{
[NoUnboundCustom]
[XmlRoot("Games"), XmlType(TypeName = "Games")]
public class Games
{
[XmlElement(IsNullable = false)]
public Collection<Game> Game { get; set; }
}
public class Game : CommonElements
{
[Key]
public Guid Id { get; set; }
public string GameId { get; set; }
public CommonElements CommonElements { get; set; }
[JsonProperty(Required = Required.Always)]
public int GameNumber { get; set; }
//XML minOccurs=0 to 1
public DateTime? Timestamp { get; set; }
public string GameFormat { get; set; }
public string GameDuration { get; set; }
//XML minOccurs=0 to 1
public int? WinningSide { get; set; }
//XML minOccurs=0 to 1
[NoUnboundCustom]
[XmlElement("Points", typeof(Points))]
public Collection<Point> Points { get; set; }
}
}