XmlSerializerAssemblyAttribute 클래스

정의

웹 서비스 클라이언트 프록시에 적용하면 사용자 지정 직렬 변환기가 포함된 어셈블리를 지정할 수 있습니다.

public ref class XmlSerializerAssemblyAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=false)]
public sealed class XmlSerializerAssemblyAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=false)>]
type XmlSerializerAssemblyAttribute = class
    inherit Attribute
Public NotInheritable Class XmlSerializerAssemblyAttribute
Inherits Attribute
상속
XmlSerializerAssemblyAttribute
특성

설명

XmlSerializerAssemblyAttribute 웹 서비스 클라이언트 애플리케이션의 성능을 향상 하려면 사용 합니다.

이 특성을 사용하는 일반적인 방법은 다음과 같습니다.

  1. 웹 서비스에 대한 클라이언트 프록시를 만듭니다.

  2. machine.config 파일을 엽니다.

  3. system.diagnostics 요소 아래에서 요소 아래에 <switches> 값을 추가하여 컴파일된 파일을 유지합니다.

    <system.diagnostics>
       <switches>
          <add name="XmlSerialization.Compilation" value="4"/>
       </switches>
    </system.diagnostics>
    
  4. 프록시를 컴파일합니다.

  5. 프록시 애플리케이션을 실행합니다.

  6. 명령 창을 열고 캐시 파일에 사용되는 \Temp 디렉터리로 XmlSerializer 이동합니다.

    cd %temp%
    
  7. /OD 스위치와 함께 dir 명령을 사용하여 만든 마지막 파일을 찾습니다.

    dir *.vb /OD
    
  8. 파일을 어셈블리로 컴파일합니다. 어셈블리 이름을 지정합니다.

  9. 클래스에 적용하여 XmlSerializerAssemblyAttribute 원래 프록시 코드를 편집합니다. 다음 C# 코드와 같이 어셈블리 이름을 지정합니다.

    [XmlSerializerAssemblyAttribute(AssemblyName="hello.serializer")]
    public class Hello: System.Web.Services.Protocols.SoapHttpClientProtocol {
       // Proxy code not shown.
    }
    
<XmlSerializerAssemblyAttribute(AssemblyName:="hello.serializer")> _
Public Class Hello
Implements System.Web.Services.Protocols.SoapHttpClientProtocol
   ' Proxy code not shown.
End Class

생성자

Name Description
XmlSerializerAssemblyAttribute()

XmlSerializerAssemblyAttribute 클래스의 새 인스턴스를 초기화합니다.

XmlSerializerAssemblyAttribute(String, String)

지정된 어셈블리 이름과 어셈블리 위치를 XmlSerializerAssemblyAttribute 사용하여 클래스의 새 인스턴스를 초기화합니다.

XmlSerializerAssemblyAttribute(String)

지정된 어셈블리 이름을 사용하여 클래스의 XmlSerializerAssemblyAttribute 새 인스턴스를 초기화합니다.

속성

Name Description
AssemblyName

특정 형식 집합에 대한 serializer를 포함하는 어셈블리의 이름을 가져오거나 설정합니다.

CodeBase

serializer를 포함하는 어셈블리의 위치를 가져오거나 설정합니다.

TypeId

파생 클래스에서 구현되는 경우 이 Attribute대한 고유 식별자를 가져옵니다.

(다음에서 상속됨 Attribute)

메서드

Name Description
Equals(Object)

이 인스턴스가 지정된 개체와 같은지 여부를 나타내는 값을 반환합니다.

(다음에서 상속됨 Attribute)
GetHashCode()

이 인스턴스의 해시 코드를 반환합니다.

(다음에서 상속됨 Attribute)
GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
IsDefaultAttribute()

파생 클래스에서 재정의되는 경우 이 인스턴스의 값이 파생 클래스의 기본값인지 여부를 나타냅니다.

(다음에서 상속됨 Attribute)
Match(Object)

파생 클래스에서 재정의되는 경우 이 인스턴스가 지정된 개체와 같은지 여부를 나타내는 값을 반환합니다.

(다음에서 상속됨 Attribute)
MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

Name Description
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

이름 집합을 해당 디스패치 식별자 집합에 매핑합니다.

(다음에서 상속됨 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

인터페이스의 형식 정보를 가져오는 데 사용할 수 있는 개체의 형식 정보를 검색합니다.

(다음에서 상속됨 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

개체가 제공하는 형식 정보 인터페이스의 수를 검색합니다(0 또는 1).

(다음에서 상속됨 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

개체에 의해 노출되는 속성 및 메서드에 대한 액세스를 제공합니다.

(다음에서 상속됨 Attribute)

적용 대상