SoapServices.PreLoad メソッド

定義

型に適用される SoapTypeAttribute で設定した値に基づいて、指定した型をプリロードします。

オーバーロード

PreLoad(Assembly)

指定した Type 内のすべての Assembly をそれぞれの型に関連付けられた SoapTypeAttribute の情報からプリロードします。

PreLoad(Type)

型の Type で設定した値に基づいて、特定の SoapTypeAttribute をプリロードします。

PreLoad(Assembly)

指定した Type 内のすべての Assembly をそれぞれの型に関連付けられた SoapTypeAttribute の情報からプリロードします。

public:
 static void PreLoad(System::Reflection::Assembly ^ assembly);
public static void PreLoad (System.Reflection.Assembly assembly);
[System.Security.SecurityCritical]
public static void PreLoad (System.Reflection.Assembly assembly);
static member PreLoad : System.Reflection.Assembly -> unit
[<System.Security.SecurityCritical>]
static member PreLoad : System.Reflection.Assembly -> unit
Public Shared Sub PreLoad (assembly As Assembly)

パラメーター

assembly
Assembly

Assembly を呼び出す各型の PreLoad(Type)

属性

例外

直前の呼び出し元に、インフラストラクチャ アクセス許可がありません。

このメソッドを使用する方法を次のコード例に示します。 このコード例は、SoapServices クラスのために提供されている大規模な例の一部です。

// Register all types in the assembly with the SoapType attribute.
System::Reflection::Assembly^ executingAssembly =
   System::Reflection::Assembly::GetExecutingAssembly();
SoapServices::PreLoad( executingAssembly );
// Register all types in the assembly with the SoapType attribute.
System.Reflection.Assembly executingAssembly =
    System.Reflection.Assembly.GetExecutingAssembly();
SoapServices.PreLoad(executingAssembly);

注釈

.NET Frameworkが XML ストリームを解析する場合は、ストリームから読み取った XML を共通言語ランタイム型に変換する方法を知る必要があります。 .NET Frameworkが XML ストリームを生成および解析する方法を指定する情報は、 名前空間にあるカスタム属性にSystem.Runtime.Remoting.Metadata格納されます。 構成ファイルでこの情報を指定するには、マッピングを明示的に指定するか、事前に読み込むオブジェクトの種類を指定する方法の 2 つの方法があります。 カスタム属性は事前読み込みプロセス中に読み取られ、その中の情報が SOAP パーサーで使用できるようになります。

適用対象

PreLoad(Type)

型の Type で設定した値に基づいて、特定の SoapTypeAttribute をプリロードします。

public:
 static void PreLoad(Type ^ type);
public static void PreLoad (Type type);
[System.Security.SecurityCritical]
public static void PreLoad (Type type);
static member PreLoad : Type -> unit
[<System.Security.SecurityCritical>]
static member PreLoad : Type -> unit
Public Shared Sub PreLoad (type As Type)

パラメーター

type
Type

プリロードする Type

属性

例外

直前の呼び出し元に、インフラストラクチャ アクセス許可がありません。

このメソッドを使用する方法を次のコード例に示します。 このコード例は、SoapServices クラスのために提供されている大規模な例の一部です。

// Register a specific type with the SoapType attribute.
Type^ exampleType = ExampleNamespace::ExampleClass::typeid;
SoapServices::PreLoad( exampleType );
// Register a specific type with the SoapType attribute.
Type exampleType = typeof(ExampleNamespace.ExampleClass);
SoapServices.PreLoad(exampleType);

注釈

.NET Frameworkが XML ストリームを解析する場合は、ストリームから読み取った XML を共通言語ランタイム型に変換する方法を知る必要があります。 .NET Frameworkが XML ストリームを生成および解析する方法を指定する情報は、 名前空間にあるカスタム属性にSystem.Runtime.Remoting.Metadata格納されます。 構成ファイルでこの情報を指定するには、マッピングを明示的に指定するか、事前に読み込むオブジェクトの種類を指定する方法の 2 つの方法があります。 カスタム属性は事前読み込みプロセス中に読み取られ、その中の情報が SOAP パーサーで使用できるようになります。

適用対象