diff --git a/src/System.ServiceModel.Primitives/src/System/ServiceModel/Channels/ServiceChannelFactory.cs b/src/System.ServiceModel.Primitives/src/System/ServiceModel/Channels/ServiceChannelFactory.cs index 117720ba387..09e434dad19 100644 --- a/src/System.ServiceModel.Primitives/src/System/ServiceModel/Channels/ServiceChannelFactory.cs +++ b/src/System.ServiceModel.Primitives/src/System/ServiceModel/Channels/ServiceChannelFactory.cs @@ -351,11 +351,6 @@ public TChannel CreateChannel(EndpointAddress address, Uri via) } serviceChannel.ClientRuntime.GetRuntime().InitializeChannel(clientChannel); - OperationContext current = OperationContext.Current; - if ((current != null) && (current.InstanceContext != null)) - { - current.InstanceContext.WmiChannels.Add((IChannel)serviceChannel.Proxy); - } return (TChannel)serviceChannel.Proxy; } diff --git a/src/System.ServiceModel.Primitives/src/System/ServiceModel/InstanceContext.cs b/src/System.ServiceModel.Primitives/src/System/ServiceModel/InstanceContext.cs index 8e6ae394d7d..17d8a72e915 100644 --- a/src/System.ServiceModel.Primitives/src/System/ServiceModel/InstanceContext.cs +++ b/src/System.ServiceModel.Primitives/src/System/ServiceModel/InstanceContext.cs @@ -23,7 +23,6 @@ public sealed class InstanceContext : CommunicationObject, IExtensibleObject _wmiChannels; private bool _isUserCreated; public InstanceContext(object implementation) @@ -149,24 +148,6 @@ internal object UserObject get { return _userObject; } } - internal ICollection WmiChannels - { - get - { - if (_wmiChannels == null) - { - lock (ThisLock) - { - if (_wmiChannels == null) - { - _wmiChannels = new SynchronizedCollection(); - } - } - } - return _wmiChannels; - } - } - protected override void OnAbort() { _channels.Abort();