コード例 #1
0
ファイル: KukuTable.cs プロジェクト: Perf-Org-5KRepos/Kuku
        /// <summary>Queries for the presence of a given item in the hash table and stash.</summary>
        /// <param name="item">The hash table item to query</param>
        /// <exception cref="ArgumentNullException">if item is null</exception>
        /// <exception cref="ArgumentException">if the given item is the empty item for this hash table</exception>
        public QueryResult Query(Item item)
        {
            if (null == item)
            {
                throw new ArgumentNullException($"{nameof(item)} cannot be null");
            }
            if (IsEmptyItem(item))
            {
                throw new ArgumentException($"{nameof(item)} cannot be the empty item");
            }

            var queryResult = new QueryResultData();

            ulong[] data = new ulong[2] {
                item.Data.Item1, item.Data.Item2
            };
            NativeMethods.KukuTable_Query(_unmanagedkukuTable, data, ref queryResult);
            return(new QueryResult(queryResult));
        }
コード例 #2
0
 internal static extern bool KukuTable_Query(IntPtr kuku_table, ulong[] item, ref QueryResultData query_result);