A game about forced loneliness, made by TACStudios
1using System;
2using System.Collections;
3
4namespace Unity.Collections
5{
6 internal struct Pair<Key, Value>
7 {
8 public Key key;
9 public Value value;
10 public Pair(Key k, Value v)
11 {
12 key = k;
13 value = v;
14 }
15
16 public override string ToString()
17 {
18 return $"{key} = {value}";
19 }
20 }
21
22 // Tiny does not contains an IList definition (or even ICollection)
23 internal struct ListPair<Key, Value> where Value : IList
24 {
25 public Key key;
26 public Value value;
27
28 public ListPair(Key k, Value v)
29 {
30 key = k;
31 value = v;
32 }
33
34 public override string ToString()
35 {
36 String result = $"{key} = [";
37 for (var v = 0; v < value.Count; ++v)
38 {
39 result += value[v];
40 if (v < value.Count - 1)
41 result += ", ";
42 }
43
44 result += "]";
45 return result;
46 }
47 }
48}