public DisconnectData(DispatcherOperation op, DUCE.Channel channel, Dispatcher dispatcher, HostVisual hostVisual, DUCE.ResourceHandle hostHandle, DUCE.ResourceHandle targetHandle, DUCE.MultiChannelResource contentRoot, DisconnectData next) { DispatcherOperation = op; Channel = channel; ChannelDispatcher = dispatcher; HostVisual = hostVisual; HostHandle = hostHandle; TargetHandle = targetHandle; ContentRoot = contentRoot; Next = next; }
/// <summary> /// Do the actual work to disconnect the VisualTarget. /// This is called (on the channel's thread) either from /// DisconnectHostedVisual or from DoPendingDisconnect, /// depending on which thread the request arrived on. /// </summary> private void Disconnect(DUCE.Channel channel, Dispatcher channelDispatcher, DUCE.ResourceHandle hostHandle, DUCE.ResourceHandle targetHandle, DUCE.MultiChannelResource contentRoot) { channelDispatcher.VerifyAccess(); DUCE.CompositionNode.RemoveChild( hostHandle, targetHandle, channel ); // // Release the targets handle. If we had duplicated the handle, // then this removes the duplicated handle, otherwise just decrease // the ref count for VisualTarget. // contentRoot.ReleaseOnChannel(channel); SetFlags(channel, false, VisualProxyFlags.IsContentNodeConnected); }