SoapServices.XmlNsForClrTypeWithAssembly 属性
定义
获取默认的 XML 命名空间前缀,该前缀应该用于具有程序集但没有本机命名空间的公共语言运行时类的 XML 编码。Gets the default XML namespace prefix that should be used for XML encoding of a common language runtime class that has an assembly, but no native namespace.
public:
static property System::String ^ XmlNsForClrTypeWithAssembly { System::String ^ get(); };
public static string XmlNsForClrTypeWithAssembly { get; }
member this.XmlNsForClrTypeWithAssembly : string
Public Shared ReadOnly Property XmlNsForClrTypeWithAssembly As String
属性值
默认的 XML 命名空间前缀,该前缀应该用于具有程序集但没有本机命名空间的公共语言运行时类的 XML 编码。The default XML namespace prefix that should be used for XML encoding of a common language runtime class that has an assembly, but no native namespace.
例外
直接调用方没有基础结构权限。The immediate caller does not have infrastructure permission.
示例
下面的代码示例演示如何使用此属性。The following code example shows how to use this property. 此代码示例是为类提供的更大示例的一部分 SoapServices 。This code example is part of a larger example provided for the SoapServices class.
// Print the XML namespace for the CLR types
// that have an assembly but no common language runtime namespace.
Console::WriteLine( L"The XML namespace for the CLR types "
L"that have an assembly but no namespace, is {0}.",
SoapServices::XmlNsForClrTypeWithAssembly );
// Print the XML namespace for the CLR types
// that have an assembly but no common language runtime namespace.
Console.WriteLine(
"The XML namespace for the CLR types " +
"that have an assembly but no namespace, is {0}.",
SoapServices.XmlNsForClrTypeWithAssembly);
注解
WSDL 和 SOAP 协议将公共语言运行时类编码为 XML 命名空间。WSDL and SOAP protocols encode common language runtime classes into XML namespaces. 当前属性指定 XML 命名空间的格式。The current property specifies the format for the XML namespaces. 如果公共语言运行时类有一个程序集,但没有命名空间,则当前属性返回使用的默认 XML 命名空间。If a common language runtime class has an assembly but no namespace, the current property returns the default XML namespace that is used.