public IRemoteConnectorInfoManager Connect(RemoteWSFrameworkConnectionInfo info) { if (Running) { ClientRemoteConnectorInfoManager manager; registry.TryGetValue(info, out manager); if (null == manager) { lock (registry) { registry.TryGetValue(info, out manager); if (null == manager) { manager = new ClientRemoteConnectorInfoManager(info, MessageListener, connectionGroups); manager.Disposed += (sender, args) => { ClientRemoteConnectorInfoManager ignore; registry.TryRemove(info, out ignore); }; registry.TryAdd(info, manager); if (!Running && registry.TryRemove(info, out manager)) { manager.Dispose(); throw new InvalidOperationException("RemoteConnectionInfoManagerFactory is shut down"); } } } } return manager; } throw new InvalidOperationException("RemoteConnectionInfoManagerFactory is shut down"); }
public RemoteDelegatingAsyncConnectorInfoManager(ClientRemoteConnectorInfoManager parent) : base(true) { _parent = parent; }