public void GetXmlNamespaces_should_get_clr_namespaces_from_xmlns() { AssemblyInfo ai = AssemblyInfo.GetAssemblyInfo(typeof(TypeReference).GetTypeInfo().Assembly); var all = ai.GetClrNamespaces(NamespaceUri.Parse(Xmlns.Core2008)); Assert.Contains("Carbonfrost.Commons.Core", all); Assert.Contains("Carbonfrost.Commons.Core.Runtime", all); Assert.DoesNotContain("Carbonfrost.Commons.ComponentModel.Annotations", all); }
public override Type Resolve() { string cleanName = _qn.LocalName.Replace('.', '+').Replace('-', '`'); foreach (var a in App.Assemblies) { AssemblyInfo ai = AssemblyInfo.GetAssemblyInfo(a); foreach (string clrns in ai.GetClrNamespaces(_qn.Namespace)) { Type result = a.GetType(CombinedTypeName(clrns, cleanName)); if (result != null) { return(result); } } } return(null); }