Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
KeyValue.cs
Go to the documentation of this file.
2
3[DataContract(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")]
4internal struct KeyValue<K, V> : IKeyValue
5{
6 private K _key;
7
8 private V _value;
9
10 [DataMember(IsRequired = true)]
11 public K Key
12 {
13 get
14 {
15 return _key;
16 }
17 set
18 {
19 _key = value;
20 }
21 }
22
23 [DataMember(IsRequired = true)]
24 public V Value
25 {
26 get
27 {
28 return _value;
29 }
30 set
31 {
32 _value = value;
33 }
34 }
35
37 {
38 get
39 {
40 return _key;
41 }
42 set
43 {
44 _key = (K)value;
45 }
46 }
47
49 {
50 get
51 {
52 return _value;
53 }
54 set
55 {
56 _value = (V)value;
57 }
58 }
59
60 internal KeyValue(K key, V value)
61 {
62 _key = key;
63 _value = value;
64 }
65}