/// <summary> /// 查找数据测试 /// </summary> private static void searchDictionary() { try { time.Restart(); int value; for (int loopCount = count / keyCount; loopCount != 0; --loopCount) { for (int index = keyCount; index != 0;) { if (!dictionary.TryGetValue(keys[--index], out value)) { isError = true; Console.WriteLine("ERROR"); return; } } } time.Stop(); } finally { dictionary.Clear(); wait.Set(); } }
/// <summary> /// 操作数据 /// </summary> /// <param name="parser">参数解析</param> internal override void OperationEnd(ref OperationParameter.NodeParser parser) { switch (parser.OperationType) { case OperationParameter.OperationType.Remove: remove(ref parser); return; case OperationParameter.OperationType.Clear: if (Dictionary.Count != 0) { Dictionary.Clear(); parser.IsOperation = true; } parser.ReturnParameter.ReturnParameterSet(true); return; } parser.ReturnParameter.ReturnType = ReturnType.OperationTypeError; }