Beispiel #1
0
            static int Check <T>()
            {
                var genericTypeId = Typeof <T> .Id;

                Assert.Equal(Typeof.GetTypeId(typeof(T)), genericTypeId);
                return(genericTypeId);
            }
Beispiel #2
0
        public void GetId()
        {
            Parallel.ForEach(_types, t => Typeof.GetTypeId(t));

            var unique = new HashSet <int>();

            foreach (var type in _types)
            {
                Assert.True(unique.Add(Typeof.GetTypeId(type)));
            }
        }