public void ScriptObject(UserDefinedFunction function, Options options)
        {
            StringCollection script   = function.Script(_scriptingOptions);
            string           path     = _directoryService.GetFunctionsDirectory(options.Root);
            string           fileName = Path.Combine(path, string.Concat(function.Name, ".sql"));

            _fileWriter.WriteFile(fileName, script.Cast <string>());
        }
        public void CreateFunctions(Options options)
        {
            string directory = _directoryService.GetFunctionsDirectory(options.Root);

            if (!Directory.Exists(directory))
            {
                Console.WriteLine($"Functions directory '{directory}' does not exist, skipping");
                return;
            }

            IEnumerable <string> files = Directory.GetFiles(directory);

            ProcessDirectoryFiles(files, options);
        }