Assembly resource loader IsXaml or not
<p>I try to create resource loader. However I have small issue. How can I replace <strong>IsXaml</strong> and write Nunit test (simulate xaml file) ? </p>

<pre><code>    public static string GetPartialName(this Assembly assembly)
    {
        var fullName = assembly.FullName;
        var startIndex = fullName.IndexOf(',');
        return fullName.Remove(startIndex);
    }

    public static Uri GetResourceUri(this Assembly assembly, string resource)
    {
        string path;
        if (IsXaml)
        {
            path = $"pack://application:,,,/{assembly.GetPartialName()};component/{resource}";
        }
        else
        {
            path = $"/{assembly.GetPartialName()};component/{resource}";
        }
        return new Uri(path, UriKind.RelativeOrAbsolute);
    }
</code></pre>

<p>Thanks</p>