Exemple #1
0
        /// <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);
            }
        }
Exemple #2
0
        /// <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);
            }
        }
Exemple #3
0
        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);
            }
        }