/* Helper function to create a key in the Key Provider. */
        /// <exception cref="Sharpen.NoSuchAlgorithmException"/>
        /// <exception cref="System.IO.IOException"/>
        private void CreateAKey(string keyName, Configuration conf)
        {
            KeyProvider provider = dfsCluster.GetNameNode().GetNamesystem().GetProvider();

            KeyProvider.Options options = KeyProvider.Options(conf);
            provider.CreateKey(keyName, options);
            provider.Flush();
        }
        private static Key GetKey(int cardSet, int discardsCount = 0, int otherSuitsDistribution = 0, bool isOwnMove = false)
        {
            Debug.Assert(cardSet <= CardSet.MaxValue);

            KeyProvider provider = GetKeyProvider(cardSet, isOwnMove);

            return(provider.CreateKey(cardSet, discardsCount, otherSuitsDistribution, isOwnMove));
        }
Example #3
0
        public void AddResult <TNodeFunction>(object result) where TNodeFunction : IFunc <TIn>
        {
            var key = KeyProvider.CreateKey <TNodeFunction>();

            if (_results.ContainsKey(key))
            {
                _results[key] = new FuncResult(result.GetType(), result);
                return;
            }

            _results.Add(KeyProvider.CreateKey <TNodeFunction>(), new FuncResult(result.GetType(), result));
        }