Exemple #1
0
        public void LoadCoreTypes()
        {
            var stringT   = TypeSignature.FromType(typeof(string));
            var dateTimeT = cx.FindTypeDef("System.DateTime");

            Assert.False(stringT.CanOverride);
            Assert.Empty(stringT.TypeParameters);
            Assert.Equal("String", stringT.Name);
            Assert.Equal("DateTime", dateTimeT.Name);
            Assert.Equal(TypeOrNamespace.NamespaceSignature(NamespaceSignature.System), dateTimeT.Parent);
            Assert.Equal(dateTimeT.Parent, stringT.Parent);

            var enumerableT = TypeSignature.FromType(typeof(IEnumerable <>));

            check.CheckJsonObject(new { stringT, dateTimeT, enumerableT });
        }