Browse Source

Added an helper to query namespaces.

pull/1/head
triton 12 years ago
parent
commit
8a4b7cab8d
  1. 5
      src/Generator.Tests/QueryHelpers.cs

5
src/Generator.Tests/QueryHelpers.cs

@ -5,6 +5,11 @@ namespace Generator.Tests
{ {
public static class LibraryQueryExtensions public static class LibraryQueryExtensions
{ {
public static Namespace Namespace(this TranslationUnit unit, string name)
{
return unit.FindNamespace(name);
}
public static Class Class(this Library library, string name) public static Class Class(this Library library, string name)
{ {
return library.FindClass(name).ToList().First(); return library.FindClass(name).ToList().First();

Loading…
Cancel
Save