public void RemoveAll() { lock (_sync_root) { foreach (var pair in _xrm_mappings) { RemotingServices.Disconnect(pair.Value); pair.Key.Rpc.RemoveHandler("xmlrpc"); } _xrm_mappings.Clear(); } }