Exemplo n.º 1
0
 void IProxyManager.TearDownChannels()
 {
     lock (this)
     {
         IEnumerator <KeyValuePair <Guid, ComProxy> > enumeratorInterfaces = InterfaceIDToComProxy.GetEnumerator();
         while (enumeratorInterfaces.MoveNext())
         {
             KeyValuePair <Guid, ComProxy> current = enumeratorInterfaces.Current;
             IDisposable comProxy = current.Value as IDisposable;
             if (comProxy == null)
             {
                 Fx.Assert("comProxy should not be null");
             }
             else
             {
                 comProxy.Dispose();
             }
         }
         InterfaceIDToComProxy.Clear();
         proxyCreator.Dispose();
         enumeratorInterfaces.Dispose();
         proxyCreator = null;
     }
 }