SurrogateSelector.AddSurrogate メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SurrogateSelector.AddSurrogate メソッドの意味・解説 

SurrogateSelector.AddSurrogate メソッド

確認済みサロゲートリストサロゲート追加します

名前空間: System.Runtime.Serialization
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Overridable Sub AddSurrogate
 ( _
    type As Type, _
    context As StreamingContext, _
    surrogate As ISerializationSurrogate _
)
Dim instance As SurrogateSelector
Dim type As Type
Dim context As StreamingContext
Dim surrogate As ISerializationSurrogate

instance.AddSurrogate(type, context, surrogate)
public virtual void AddSurrogate (
    Type type,
    StreamingContext context,
    ISerializationSurrogate surrogate
)
public:
virtual void AddSurrogate (
    Type^ type, 
    StreamingContext context, 
    ISerializationSurrogate^ surrogate
)
public void AddSurrogate (
    Type type, 
    StreamingContext context, 
    ISerializationSurrogate surrogate
)
public function AddSurrogate (
    type : Type, 
    context : StreamingContext, 
    surrogate : ISerializationSurrogate
)

パラメータ

type

サロゲート要求する対象Type

context

コンテキスト固有のデータ

surrogate

この型を呼び出すサロゲート

例外例外
例外種類条件

ArgumentNullException

type パラメータまたは surrogate パラメータnull 参照 (Visual Basic では Nothing) です。

ArgumentException

サロゲートが、この型およびこのコンテキストに既に存在します

使用例使用例

AddSurrogate メソッド呼び出すコード例次に示します。このコード例は、SurrogateSelector クラストピック取り上げているコード例一部分です。

// Create a SurrogateSelector.
SurrogateSelector ss = new SurrogateSelector();

// Tell the SurrogateSelector that Employee objects are serialized and
 deserialized 
// using the EmployeeSerializationSurrogate object.
ss.AddSurrogate(typeof(Employee),
new StreamingContext(StreamingContextStates.All),
new EmployeeSerializationSurrogate());
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SurrogateSelector クラス
SurrogateSelector メンバ
System.Runtime.Serialization 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からSurrogateSelector.AddSurrogate メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からSurrogateSelector.AddSurrogate メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からSurrogateSelector.AddSurrogate メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

SurrogateSelector.AddSurrogate メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SurrogateSelector.AddSurrogate メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS