BindingContext.Clone メソッド

定義

現在のチャネル ビルド コンテキストのコピーを返します。

public:
 System::ServiceModel::Channels::BindingContext ^ Clone();
public System.ServiceModel.Channels.BindingContext Clone();
member this.Clone : unit -> System.ServiceModel.Channels.BindingContext
Public Function Clone () As BindingContext

返品

現在のチャネル ビルド コンテキストのコピーである BindingContext オブジェクト。

CustomBinding binding = new CustomBinding();
BindingParameterCollection bpCol = new BindingParameterCollection();
BindingContext context = new BindingContext(binding, bpCol);
BindingContext clonedContext = context.Clone();
Dim binding As New CustomBinding()
Dim bpCol As New BindingParameterCollection()
Dim context As New BindingContext(binding, bpCol)
Dim clonedContext As BindingContext = context.Clone()

注釈

このメソッドは、バインド コンテキストのディープ クローンであるコピーを返します。 オブジェクトのディープ クローンは、オブジェクトのコピーと、そのオブジェクトによって直接または間接的に参照されるすべてのコピーを作成します。 (これはオブジェクト グラフ全体のコピーとも呼ばれます)。対照的に、オブジェクトの浅い複製は、オブジェクトのコピーのみです。 オブジェクトに他のオブジェクトへの参照が含まれている場合、浅いコピーでは参照されるオブジェクトのコピーは作成されません。代わりに、元のオブジェクトへの参照のみをコピーします。

適用対象