public void PredefinedNamespaces() { Assert.AreEqual(Constants.Soap11, ctx.LookupNamespace("s11"), "#1"); Assert.AreEqual(Constants.Soap12, ctx.LookupNamespace("s12"), "#2"); // ... only them? foreach (char c in "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") { Assert.IsNull(ctx.LookupNamespace(c + ""), "char:" + c); } Assert.IsNull(ctx.LookupNamespace("wsa"), "#3"); Assert.IsNull(ctx.LookupNamespace("wsu"), "#4"); }
public XPathMessageContextMarkupExtension(XPathMessageContext context) : this() { foreach (string str in context) { if (!implicitPrefixes.Contains(str)) { this.namespaces.Add(str, context.LookupNamespace(str)); } } }