public void ProcessAndValidate() { //Parsing CodeTalk Key Keys cKey; if (CommandConstants.KeyNamesReverseMap.TryGetValue(CodeTalkKeyString, out cKey)) { if (CommandConstants.SupportedCodeTalkKeys.Contains(cKey)) { CodeTalkKey = cKey; } else { throw new Exception("Invalid CodeTalk key. Only the number keys and ~, -, and + are supported."); } } else { throw new Exception("Selected CodeTalk key doesn't exist."); } //Processing and validating commands GetFunctionsCommandKeyConfig.ProcessAndValidate("Get Functions"); GetSummaryCommandKeyConfig.ProcessAndValidate("Get Summary"); GetErrorsCommandKeyConfig.ProcessAndValidate("Get Errors"); SkipCommentCommandKeyConfig.ProcessAndValidate("Skip comments"); GetContextCommandKeyConfig.ProcessAndValidate("Get Context"); MoveToContextCommandKeyConfig.ProcessAndValidate("Move To Context"); CreateBreakpointCommandKeyConfig.ProcessAndValidate("Create Breakpoint"); SetProfilepointsCommandKeyConfig.ProcessAndValidate("Set Profilepoints"); }
public void PrepareWrite() { var cKeyString = string.Empty; if (CommandConstants.SupportedCodeTalkKeys.Contains(this.CodeTalkKey)) { if (CommandConstants.KeyNamesMap.TryGetValue(this.CodeTalkKey, out cKeyString)) { this.CodeTalkKeyString = cKeyString; } else { throw new Exception("Invalid CodeTalk Key. The key doesn't exist."); } } else { throw new Exception("Invalid CodeTalk Key. The key is not supported."); } //Preparing for write : Commands GetFunctionsCommandKeyConfig.PrepareWrite("Get Functions"); GetSummaryCommandKeyConfig.PrepareWrite("Get Summary"); GetErrorsCommandKeyConfig.PrepareWrite("Get Errors"); SkipCommentCommandKeyConfig.PrepareWrite("Skip comments"); GetContextCommandKeyConfig.PrepareWrite("Get Context"); MoveToContextCommandKeyConfig.PrepareWrite("Move To Context"); CreateBreakpointCommandKeyConfig.PrepareWrite("Create Breakpoint"); SetProfilepointsCommandKeyConfig.PrepareWrite("Set Profilepoints"); }