A game about forced loneliness, made by TACStudios
1using System.Collections;
2using System.Collections.Specialized;
3using UnityEngine.Scripting;
4
5namespace Unity.VisualScripting
6{
7 // Making this inherit OrderedDictionary for now because metadata
8 // doesn't work well for unordered dictionaries. The ideal solution
9 // would be to rework the MetadataDictionaryAdaptor to not require
10 // the index at all, then make this inherit Dictionary<object, object>
11
12 public sealed class AotDictionary : OrderedDictionary
13 {
14 public AotDictionary() : base() { }
15 public AotDictionary(IEqualityComparer comparer) : base(comparer) { }
16 public AotDictionary(int capacity) : base(capacity) { }
17 public AotDictionary(int capacity, IEqualityComparer comparer) : base(capacity, comparer) { }
18
19 [Preserve]
20 public static void AotStubs()
21 {
22 var dictionary = new AotDictionary();
23
24 dictionary.Add(default(object), default(object));
25 dictionary.Remove(default(object));
26 var item = dictionary[default(object)];
27 dictionary[default(object)] = default(object);
28 dictionary.Contains(default(object));
29 dictionary.Clear();
30 var count = dictionary.Count;
31 }
32 }
33}