public void TestEnums() { var source = new List <ITypeMetadata> { m_Stencil.GenerateTypeHandle(typeof(string)).GetMetadata(m_Stencil), m_Stencil.GenerateTypeHandle(typeof(MemberFlags)).GetMetadata(m_Stencil) }; var db = new TypeSearcherDatabase(m_Stencil, source).AddEnums().Build(); ValidateHierarchy(db.Search("", out _), new[] { new SearcherItem("Enumerations", "", new List <SearcherItem> { new TypeSearcherItem( typeof(MemberFlags).GenerateTypeHandle(m_Stencil), typeof(MemberFlags).FriendlyName() ) }) }); }
public void TestClasses() { var source = new List <ITypeMetadata> { m_Stencil.GenerateTypeHandle(typeof(string)).GetMetadata(m_Stencil), m_Stencil.GenerateTypeHandle(typeof(ClassForTest)).GetMetadata(m_Stencil), m_Stencil.GenerateTypeHandle(typeof(MemberFlags)).GetMetadata(m_Stencil) }; var db = new TypeSearcherDatabase(m_Stencil, source).AddClasses().Build(); ValidateHierarchy(db.Search("", out _), new[] { new SearcherItem("Classes", "", new List <SearcherItem> { new SearcherItem("System", "", new List <SearcherItem> { new TypeSearcherItem( typeof(string).GenerateTypeHandle(m_Stencil), typeof(string).FriendlyName() ) }), new SearcherItem("UnityEditor", "", new List <SearcherItem> { new SearcherItem("VisualScriptingTests", "", new List <SearcherItem> { new SearcherItem("SmartSearch", "", new List <SearcherItem> { new TypeSearcherItem( typeof(ClassForTest).GenerateTypeHandle(m_Stencil), typeof(ClassForTest).FriendlyName() ) }) }) }) }) }); }