Επεξεργασία

Κοινή χρήση μέσω


SoapServices.CodeXmlNamespaceForClrTypeNamespace(String, String) Method

Definition

Returns the common language runtime type namespace name from the provided namespace and assembly names.

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

Parameters

typeNamespace
String

The namespace that is to be coded.

assemblyName
String

The name of the assembly that is to be coded.

Returns

The common language runtime type namespace name from the provided namespace and assembly names.

Attributes

Exceptions

The assemblyName and typeNamespace parameters are both either null or empty.

The immediate caller does not have infrastructure permission.

Examples

The following code example shows how to use this method. This code example is part of a larger example provided for the SoapServices class.

// 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);

Remarks

The current method is used by the .NET Framework and the SoapSuds tool to create an XML namespace name for a common language runtime object type.

For more information about SoapSuds, see Soapsuds Tool (Soapsuds.exe).

Applies to