/// <summary> /// Reads the function from a particular query /// </summary> /// <param name="queryContent">the content from the query</param> public static void ReadFunctionsFromQuery(string queryContent) { var functions = CslParser.ReadFunctionsFromQuery(queryContent); foreach (var f in functions) { Add(f.Name, f); } }
/// <summary> /// Parse and load any functions from the current file contents /// </summary> /// <param name="cslFileContent">the content from the file</param> public static void ReadFunctionsFromFile(string cslFileContent) { var functions = CslParser.ReadFunctionsFromFile(cslFileContent); foreach (var f in functions) { Add(f.Name, f); } }
public void AddCslFile(string filepath, bool stopKqlQuerys = false) { // Optionally clear out currently executing KqlQuerys, or only add new ones if (stopKqlQuerys) { InitializeKqlQueryLists(); } foreach (var para in CslParser.ReadFile(filepath)) { this.AddKqlQuery(para); } }