SoapServices.CodeXmlNamespaceForClrTypeNamespace(String, String) 方法

定义

返回提供的命名空间和程序集名称中的公共语言运行时类型命名空间名称。

public:
 static System::String ^ CodeXmlNamespaceForClrTypeNamespace(System::String ^ typeNamespace, System::String ^ assemblyName);
public static string CodeXmlNamespaceForClrTypeNamespace (string typeNamespace, string assemblyName);
[System.Security.SecurityCritical]
public static string CodeXmlNamespaceForClrTypeNamespace (string typeNamespace, string assemblyName);
static member CodeXmlNamespaceForClrTypeNamespace : string * string -> string
[<System.Security.SecurityCritical>]
static member CodeXmlNamespaceForClrTypeNamespace : string * string -> string
Public Shared Function CodeXmlNamespaceForClrTypeNamespace (typeNamespace As String, assemblyName As String) As String

参数

typeNamespace
String

要编码的命名空间。

assemblyName
String

要编码的程序集的名称。

返回

提供的命名空间和程序集名称中的公共语言运行时类型命名空间名称。

属性

例外

assemblyNametypeNamespace 参数同为 null 或空。

直接调用方没有基础结构权限。

示例

下面的代码示例演示如何使用此方法。 此代码示例是为 SoapServices 类提供的一个更大示例的一部分。

// Convert a CLR namespace and assembly name into an XML namespace.
String^ xmlNamespace = SoapServices::CodeXmlNamespaceForClrTypeNamespace(
   L"ExampleNamespace", L"AssemblyName" );
Console::WriteLine( L"The name of the XML namespace is {0}.", xmlNamespace );
// Convert a CLR namespace and assembly name into an XML namespace.
string xmlNamespace = 
    SoapServices.CodeXmlNamespaceForClrTypeNamespace(
    "ExampleNamespace", "AssemblyName");
Console.WriteLine("The name of the XML namespace is {0}.", 
    xmlNamespace);

注解

当前方法由 .NET Framework 和 SoapSuds 工具用于为公共语言运行时对象类型创建 XML 命名空间名称。

有关 SoapSuds 的详细信息,请参阅 Soapsuds Tool (Soapsuds.exe)

适用于