示例#1
0
 /// <summary>
 /// 执行宏添加常引用指令
 /// </summary>
 /// <param name="macroInstructionParameters"></param>
 /// <exception cref="FileNotFoundException"></exception>
 /// <exception cref="UnauthorizedAccessException"></exception>
 /// <exception cref="ConstQuoteNameAlreadyExistsException"></exception>
 private void ExecuteMacroAddConstQuote(List <string> macroInstructionParameters)
 {
     try
     {
         if (macroInstructionParameters.Count != 2)
         {
             throw new MacroFormatException();
         }
         string constQuoteName = AConstQuote.ConstQuoteNamePull(macroInstructionParameters[0]);
         AConstQuote.Add(constQuoteName, macroInstructionParameters[1]);
     }
     catch (Exception) { throw; }
 }
示例#2
0
 /// <summary>
 /// 执行宏删除常引用指令
 /// </summary>
 /// <param name="delConstQuoteName"></param>
 private void ExecuteMacroDelConstQuote(string delConstQuoteName)
 {
     AConstQuote.Delete(AConstQuote.ConstQuoteNamePull(delConstQuoteName));
 }
示例#3
0
 public void ConstQuoteNamePullTest(string nameMayWithStuffix, string excepted)
 {
     Assert.AreEqual(excepted, AConstQuote.ConstQuoteNamePull(nameMayWithStuffix));
 }