/// <summary> /// Removes a code tag lister by name. This is not case sensitive /// </summary> /// <param name="methodName"></param> /// <param name="listener"></param> public void RemoveCodeTagListener(string methodName, CodeTagListener listener) { //if(methodName.EqualsIgnoreCase("Choice") || methodName.EqualsIgnoreCase("Switch")) // throw new Exception("You cannot remove a code tag listener by that name: " + methodName + "\nIt is reserved."); methodName = methodName.ToLower(); if(codeTagListeners.ContainsKey(methodName)) codeTagListeners.Remove(methodName); }
/// <summary> /// Registers a code tag listener by a specific name. This is not case sensitive /// </summary> /// <param name="methodName"></param> /// <param name="listener"></param> public void RegisterCodeTagListener(string methodName, CodeTagListener listener) { //if(methodName.EqualsIgnoreCase("Choice") || methodName.EqualsIgnoreCase("Switch")) // throw new Exception("You cannot register a code tag listener by that name: " + methodName + "\nIt is reserved."); codeTagListeners.Add(methodName.ToLower(), listener); }