Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Support clr-namespace for namespace declaration as well #122

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions OmniXaml/TypeLocation/TypeDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

public class TypeDirectory : ITypeDirectory
{
private const string ClrNamespace = "using:";
private static readonly List<string> namespaceDeclarations = new List<string> { "using:", "clr-namespace:" };
private readonly ISet<XamlNamespace> xamlNamespaces;

public TypeDirectory(IEnumerable<XamlNamespace> xamlNamespaces)
Expand Down Expand Up @@ -43,7 +43,7 @@ private Namespace GetNamespace(string name)

private static bool IsClrNamespace(string ns)
{
return ns.StartsWith(ClrNamespace);
return namespaceDeclarations.Exists(decl => ns.StartsWith(decl));
}
}
}
}