Exemple #1
0
            public bool TryPredecessor(K item, out K res)
            {
                bool success = sorteddict.TryPredecessor(item, out SCG.KeyValuePair <K, V> pRes);

                res = pRes.Key;
                return(success);
            }
 /// <summary>
 /// Find the entry in the dictionary whose key is the
 /// predecessor of the specified key.
 /// </summary>
 /// <param name="key">The key</param>
 /// <param name="res">The predecessor, if any</param>
 /// <returns>True if key has a predecessor</returns>
 public bool TryPredecessor(K key, out SCG.KeyValuePair <K, V> res) => sorteddict.TryPredecessor(key, out res);
Exemple #3
0
 /// <summary>
 /// Find the entry in the dictionary whose key is the
 /// predecessor of the specified key.
 /// </summary>
 /// <param name="key">The key</param>
 /// <param name="res">The predecessor, if any</param>
 /// <returns>True if key has a predecessor</returns>
 public bool TryPredecessor(K key, out KeyValuePair <K, V> res)
 {
     return(sorteddict.TryPredecessor(key, out res));
 }
Exemple #4
0
 public PrivateKeyShare?GetThresholdSignatureKeyForBlock(ulong block)
 {
     return(!_tsKeys.TryPredecessor(block + 1, out var predecessor) ? null : predecessor.Value);
 }