public Allocation GetByPeer(ServerEndPoint local, IPEndPoint remote) { Allocation allocation = null; lock (syncRoot) allocations4.TryGetValue(GetKey(local, remote), out allocation); return(allocation != null && allocation.IsValid() ? allocation : null); }
public Allocation Get(ConnectionId connectionId) { Allocation allocation = null; lock (syncRoot) allocations3.TryGetValue(connectionId, out allocation); return(allocation != null && allocation.IsValid() ? allocation : null); }
public Allocation Get(TransactionId transactionId) { Allocation allocation = null; lock (syncRoot) allocations1.TryGetValue(transactionId, out allocation); return(allocation != null && allocation.IsValid() ? allocation : null); }
public Allocation Get(ServerEndPoint allocated) { Allocation allocation = null; lock (syncRoot) { if (byAllocated.TryGetValue(allocated, out allocation) == false) { byReal.TryGetValue(allocated, out allocation); } } return(allocation != null && allocation.IsValid() ? allocation : null); }