public UniqueCardPicker(IList <DominionCard> allCards) { this.allCards = allCards; this.remainingCards = new int[allCards.Count]; for (int i = 0; i < remainingCards.Length; ++i) { remainingCards[i] = i; } this.maxIndex = remainingCards.Length - 1; this.excludes = new Generic.Dictionary <DominionCard, bool>(); }
static void Main(string[] args) { StandardC.ArrayList standardArrayList = new StandardC.ArrayList(); StandardC.Hashtable standardHashtable = new StandardC.Hashtable(); StandardC.Queue standardQueue = new StandardC.Queue(); StandardC.Stack standardStack = new StandardC.Stack(); Generic.Dictionary <int, string> genericDictionary = new Generic.Dictionary <int, string>(); Generic.List <int> genericList = new Generic.List <int>(); Generic.Queue <int> genericQueue = new Generic.Queue <int>(); Generic.SortedList <int, string> genericSortedList = new Generic.SortedList <int, string>(); Generic.Stack <int> genericStack = new Generic.Stack <int>(); Concurrent.BlockingCollection <int> concurrentBlockingCollection = new Concurrent.BlockingCollection <int>(); Concurrent.ConcurrentDictionary <int, string> concurrentDictionary = new Concurrent.ConcurrentDictionary <int, string>(); Concurrent.ConcurrentQueue <int> concurrentQueue = new Concurrent.ConcurrentQueue <int>(); Concurrent.ConcurrentStack <int> concurrentStack = new Concurrent.ConcurrentStack <int>(); Console.WriteLine("Hello World!"); }
public static Generic.Dictionary <Type, T> GetTypesWithAttribute <T>() { Debug.Log(" In ReflectionHelper.GetTypesWithAttribute"); Generic.Dictionary <Type, T> all = new Generic.Dictionary <Type, T>(); //var ass = GetAssemblyByName("Assembly-CSharp"); var assemblies = AppDomain.CurrentDomain.GetAssemblies(); Debug.Log($"Found {assemblies.Length} assemblies"); foreach (var assembly in assemblies) { if (assembly.FullName.Contains("mscorlib") || assembly.FullName.Contains("UnityEngine") || assembly.FullName.Contains("UnityEditor") || assembly.FullName.Contains("System.") || assembly.FullName.Contains("System,") || assembly.FullName.Contains("Unity.") || assembly.FullName.Contains("Mono.")) { continue; } //Debug.Log($"Checking assembly {assembly.FullName}"); foreach (Type type in assembly.GetTypes()) { object attribute = type.GetCustomAttribute(typeof(T), true); if (attribute != null) { Debug.Log($"------------- Found Type {type.Name}"); all.Add(type, (T)attribute); break; } } } return(all); }