コード例 #1
0
        public void CommitSuccess(string deviceId)
        {
            IPersistentConnection connection;

            if (CommitConnections.TryRemove(deviceId, out connection))
            {
                connection.NextPeekTime = PeekTime;
                PeekConnections.Enqueue(connection);
            }
        }
コード例 #2
0
        public bool IsCommitable(string deviceId)
        {
            IPersistentConnection connection;

            if (CommitConnections.TryGetValue(deviceId, out connection))
            {
                return(connection.LastCommitTime > _dateTimeProvider.UtcNow);
            }
            return(false);
        }