public List <Script> GetScripts()
        {
            List <Script> result = new List <Script>();

            FilterScriptService manager = new FilterScriptService();
            var filterScripts           = manager.ReadFilterScripts(_appSettings.ScriptDirectory);

            if (filterScripts != null && filterScripts.Any())
            {
                foreach (var filterScript in filterScripts)
                {
                    Script s = new Script();
                    s.FileName    = filterScript.Filename;
                    s.Description = filterScript.name;
                    if (filterScript.Items != null)
                    {
                        s.LstFilters = new List <FilterScriptParameter>();
                        foreach (var item in filterScript.Items)
                        {
                            FilterScriptParameter fsp = new FilterScriptParameter();

                            if (item.GetType() == typeof(FilterScriptXmlfilter))
                            {
                                var filterScriptXmlItem = (FilterScriptXmlfilter)item;
                                fsp.LstParameters = new List <ScriptParameter>();
                                fsp.Name          = filterScriptXmlItem.name;
                                if (filterScriptXmlItem.xmlparam != null)
                                {
                                    foreach (var param in filterScriptXmlItem?.xmlparam)
                                    {
                                        ScriptParameter p = new ScriptParameter();
                                        p.DefaultValue = param.value;
                                        p.Name         = param.name;
                                        p.Type         = ScriptParameterType.Text;
                                        fsp.LstParameters.Add(p);
                                    }
                                }

                                s.LstFilters.Add(fsp);
                            }

                            if (item.GetType() == typeof(FilterScriptFilter))
                            {
                                var filterScriptXmlItem = (FilterScriptFilter)item;
                                fsp.LstParameters = new List <ScriptParameter>();
                                fsp.Name          = filterScriptXmlItem.name;
                                if (filterScriptXmlItem.Param != null)
                                {
                                    foreach (var param in filterScriptXmlItem?.Param)
                                    {
                                        ScriptParameter p = new ScriptParameter();
                                        p.Description  = param.description;
                                        p.DefaultValue = param.value;
                                        p.Name         = param.name;
                                        p.Tooltip      = param.tooltip;
                                        p.Type         = ParameterConverter.ConvertParameter(param.type);
                                        fsp.LstParameters.Add(p);
                                    }
                                }

                                s.LstFilters.Add(fsp);
                            }
                        }
                    }

                    result.Add(s);
                }
            }

            return(result);
        }