1 override of GetPreferredPrefix
PresentationFramework (1)
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
47public override string GetPreferredPrefix(string xmlns)
17 references to GetPreferredPrefix
PresentationFramework (1)
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
49return _parentSchemaContext.GetPreferredPrefix(xmlns);
System.Xaml (2)
System\Xaml\XamlObjectReader.cs (1)
2608string basePrefix = SchemaContext.GetPreferredPrefix(ns);
System\Xaml\XamlXmlWriter.cs (1)
473string basePrefix = SchemaContext.GetPreferredPrefix(ns);
System.Xaml.Tests (14)
System\Xaml\XamlSchemaContextTests.cs (14)
124Assert.Equal(expected, context.GetPreferredPrefix(xmlns)); 125Assert.Equal(expected, context.GetPreferredPrefix(xmlns)); 178Assert.Equal(expected, context.GetPreferredPrefix(xmlns)); 179Assert.Equal(expected, context.GetPreferredPrefix(xmlns)); 186Assert.Equal("p", context.GetPreferredPrefix("noSuchNamespace")); 195Assert.Equal("loadedPrefix", context.GetPreferredPrefix("loadedNamespace")); 260Assert.Equal(expected, context.GetPreferredPrefix(xmlns)); 267Assert.Equal("p", context.GetPreferredPrefix("prefix")); 274Assert.Throws<ArgumentNullException>("xmlns", () => context.GetPreferredPrefix(null)); 330Assert.Throws<XamlSchemaException>(() => context.GetPreferredPrefix("xmlns")); 344Assert.Throws<NullReferenceException>(() => context.GetPreferredPrefix("xmlns")); 358Assert.Throws<InvalidCastException>(() => context.GetPreferredPrefix("xmlns")); 372Assert.Throws<NullReferenceException>(() => context.GetPreferredPrefix("xmlns")); 386Assert.Throws<InvalidCastException>(() => context.GetPreferredPrefix("xmlns"));