System.Runtime.Remoting.Services.EnterpriseServicesHelper.SwitchWrappers Method

Switches a [<topic://cpconcomcallablewrapper>] (CCW) from one instance of a class to another instance of the same class.

Syntax

public static void SwitchWrappers (System.Runtime.Remoting.Proxies.RealProxy oldcp, System.Runtime.Remoting.Proxies.RealProxy newcp)

Parameters

oldcp
A proxy that represents the old instance of a class that is referenced by a CCW.
newcp
A proxy that represents the new instance of a class that is referenced by a CCW.

Remarks

Note:

This method can cause unwanted behavior. Before calling it, the user must ensure that this is a thread-safe operation, and that a call is not being made through the CCW to one of the instances of the class.

Requirements

Namespace: System.Runtime.Remoting.Services
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0