An attribute that can be used on the assembly level
to help with the automatic XAML-like serialization of the classes in that assembly.
Namespace: yWorks.SupportAssembly: yWorks.yFilesNET.Viewer (in yWorks.yFilesNET.Viewer.dll) Version: 4.1.0.1 (4.1.0.1)
Syntax
| C# |
|---|
[AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = true)] public class XmlnsPrefixAttribute : Attribute |
| Visual Basic |
|---|
<AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple := True)> _ Public Class XmlnsPrefixAttribute _ Inherits Attribute |
Remarks
This attribute can be used to tell the serialization engine which XML prefix to use for
for a certain XML namespace that has been declared using the XmlnsDefinitionAttribute in the assembly
this attribute is declared for.
A typical use case is to map several CLR namespaces to a human readable XML namespace. If this attribute is not specified for a CLR namespace, a standard clr-namespace:XXX XML namespace is generated.
Examples
This sample shows how to map the CLR namespaces Foo.Bar and Foo.Baz both to the XML namespace http://foo.bar
and associate the default XML prefix foo with this namespace:
CopyC#
[assembly: XmlnsDefinition("http://foo.bar", "Foo.Bar")] [assembly: XmlnsDefinition("http://foo.bar", "Foo.Baz")] [assembly: XmlnsPrefix("http://foo.bar", "foo")]
Inheritance Hierarchy
System..::..Object
System..::..Attribute
yWorks.Support..::..XmlnsPrefixAttribute
System..::..Attribute
yWorks.Support..::..XmlnsPrefixAttribute