Uređivanje

Dijeli putem


XmlSerializer.GetXmlSerializerAssemblyName Method

Definition

Returns the name of the assembly that contains one or more versions of the XmlSerializer especially created to serialize or deserialize specific types.

Overloads

GetXmlSerializerAssemblyName(Type)

Returns the name of the assembly that contains one or more versions of the XmlSerializer especially created to serialize or deserialize the specified type.

GetXmlSerializerAssemblyName(Type, String)

Returns the name of the assembly that contains the serializer for the specified type in the specified namespace.

Remarks

The XML Serializer Generator Tool (Sgen.exe) creates an XML serialization assembly for types in a specified assembly to improve the run-time performance of an XmlSerializer when it serializes or deserializes objects of the specified types. Use the GetXmlSerializerAssemblyName to return the name of such an assembly.

If you are distributing such an assembly as part of a client application that calls a Web service, you can apply the XmlSerializerAssemblyAttribute to the client type to specify the location and name of the assembly.

GetXmlSerializerAssemblyName(Type)

Source:
XmlSerializer.cs
Source:
XmlSerializer.cs
Source:
XmlSerializer.cs

Returns the name of the assembly that contains one or more versions of the XmlSerializer especially created to serialize or deserialize the specified type.

public:
 static System::String ^ GetXmlSerializerAssemblyName(Type ^ type);
public static string GetXmlSerializerAssemblyName (Type type);
static member GetXmlSerializerAssemblyName : Type -> string
Public Shared Function GetXmlSerializerAssemblyName (type As Type) As String

Parameters

type
Type

The Type you are deserializing.

Returns

The name of the assembly that contains an XmlSerializer for the type.

Remarks

The XML Serializer Generator Tool (Sgen.exe) creates an XML serialization assembly for types in a specified assembly to improve the run-time performance of an XmlSerializer when it serializes or deserializes objects of the specified types. Use the GetXmlSerializerAssemblyName to return the name of such an assembly.

If you are distributing such an assembly as part of a client application that calls a Web service, you can apply the XmlSerializerAssemblyAttribute to the client type to specify the location and name of the assembly.

Applies to

GetXmlSerializerAssemblyName(Type, String)

Source:
XmlSerializer.cs
Source:
XmlSerializer.cs
Source:
XmlSerializer.cs

Returns the name of the assembly that contains the serializer for the specified type in the specified namespace.

public:
 static System::String ^ GetXmlSerializerAssemblyName(Type ^ type, System::String ^ defaultNamespace);
public static string GetXmlSerializerAssemblyName (Type type, string? defaultNamespace);
public static string GetXmlSerializerAssemblyName (Type type, string defaultNamespace);
static member GetXmlSerializerAssemblyName : Type * string -> string
Public Shared Function GetXmlSerializerAssemblyName (type As Type, defaultNamespace As String) As String

Parameters

type
Type

The Type you are interested in.

defaultNamespace
String

The namespace of the type.

Returns

The name of the assembly that contains specially built serializers.

Remarks

The XML Serializer Generator Tool (Sgen.exe) creates an XML serialization assembly for types in a specified assembly to improve the run-time performance of an XmlSerializer when it serializes or deserializes objects of the specified types. Use the GetXmlSerializerAssemblyName to return the name of such an assembly.

If you are distributing such an assembly as part of a client application that calls a Web service, you can apply the XmlSerializerAssemblyAttribute to the client type to specify the location and name of the assembly.

Applies to