コード例 #1
0
ファイル: GoofyEngine.cs プロジェクト: GoofyCMS/Backend
        private void ExecActionForeachSortableType <T>(Action <T> action) where T : ISortableTask
        {
            var depAssemblerTypes = _resourcesLoader.FindClassesOfType <T>()
                                    .Select(t => (T)_services.Resolve(t));
            var assemblers = depAssemblerTypes.OrderBy(s => s.Order);

            foreach (var depAssembler in assemblers)
            {
                action(depAssembler);
            }
        }
コード例 #2
0
        public void Run()
        {
            var policies = new List <GoofyCrudPolicy>();

            _services.AddGoofyCrudPolicies(_resourcesLocator.FindClassesOfType <GoofyEntityBase>());
        }