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