public static void RegisterColumnsScripts(IDynamicScriptManager scriptManager,
                                                  ITypeSource typeSource, IPropertyItemProvider propertyProvider, IServiceProvider serviceProvider)
        {
            if (scriptManager == null)
            {
                throw new ArgumentNullException(nameof(scriptManager));
            }

            if (typeSource == null)
            {
                throw new ArgumentNullException(nameof(typeSource));
            }

            var scripts = new List <Func <string> >();

            foreach (var type in typeSource.GetTypesWithAttribute(typeof(ColumnsScriptAttribute)))
            {
                var attr   = type.GetCustomAttribute <ColumnsScriptAttribute>();
                var script = new ColumnsScript(attr.Key, type, propertyProvider, serviceProvider);
                scriptManager.Register(script);
                scripts.Add(script.GetScript);
            }

            scriptManager.Register("ColumnsBundle", new ConcatenatedScript(scripts));
        }
        public static void RegisterColumnsScripts()
        {
            var assemblies = ExtensibilityHelper.SelfAssemblies;

            var scripts = new List<Func<string>>();

            foreach (var assembly in assemblies)
                foreach (var type in assembly.GetTypes())
                {
                    var attr = type.GetCustomAttribute<ColumnsScriptAttribute>();
                    if (attr != null)
                    {
                        var script = new ColumnsScript(attr.Key, type);
                        DynamicScriptManager.Register(script);
                        scripts.Add(script.GetScript);
                    }
                }

            DynamicScriptManager.Register("ColumnsBundle", new ConcatenatedScript(scripts));
        }
        public static void RegisterColumnsScripts()
        {
            var assemblies = ExtensibilityHelper.SelfAssemblies;

            var scripts = new List <Func <string> >();

            foreach (var assembly in assemblies)
            {
                foreach (var type in assembly.GetTypes())
                {
                    var attr = type.GetCustomAttribute <ColumnsScriptAttribute>();
                    if (attr != null)
                    {
                        var script = new ColumnsScript(attr.Key, type);
                        DynamicScriptManager.Register(script);
                        scripts.Add(script.GetScript);
                    }
                }
            }

            DynamicScriptManager.Register("ColumnsBundle", new ConcatenatedScript(scripts));
        }