public void RemoveAsyncContext(SMB2AsyncContext context) { lock (m_pendingRequests) { m_pendingRequests.Remove(context.AsyncID); } }
public SMB2AsyncContext CreateAsyncContext(FileID fileID, SMB2ConnectionState connection, ulong sessionID, uint treeID) { ulong?asyncID = AllocateAsyncID(); if (asyncID == null) { return(null); } SMB2AsyncContext context = new SMB2AsyncContext(); context.AsyncID = asyncID.Value; context.FileID = fileID; context.Connection = connection; context.SessionID = sessionID; context.TreeID = treeID; lock (m_pendingRequests) { m_pendingRequests.Add(asyncID.Value, context); } return(context); }