コード例 #1
0
    public ProductGroup(AppApiGroup source)
        : base(source)
    {
        var actions = new WebAppApiActionFactory(source);

        Index   = source.AddAction(actions.DefaultView());
        GetInfo = source.AddAction
                  (
            actions.Action
            (
                nameof(GetInfo),
                () => new GetInfoAction()
            )
                  );
        AddProduct = source.AddAction
                     (
            actions.Action
            (
                nameof(AddProduct),
                () => new AddProductValidation(),
                () => new AddProductAction()
            )
                     );
        Product = source.AddAction
                  (
            actions.Action
            (
                nameof(Product),
                () => new ProductAction(),
                "Get Product Information"
            )
                  );
    }
コード例 #2
0
        public AppListGroup(AppApiGroup source, AppListActionFactory factory) : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index = source.AddAction(actions.View(nameof(Index), factory.CreateIndex));
            All   = source.AddAction
                    (
                actions.Action
                (
                    nameof(All),
                    factory.CreateAll
                )
                    );
            GetAppModifierKey = source.AddAction
                                (
                actions.Action(nameof(GetAppModifierKey), factory.CreateGetAppModifierKey)
                                );
            RedirectToApp = source.AddAction
                            (
                actions.Action
                (
                    nameof(RedirectToApp),
                    factory.CreateRedirectToApp
                )
                            );
        }
コード例 #3
0
        public VersionInquiryGroup(AppApiGroup source, IServiceProvider services)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            GetCurrentVersion = source.AddAction(actions.Action(nameof(GetCurrentVersion), () => CreateGetCurrentVersion(services)));
            GetVersion        = source.AddAction(actions.Action(nameof(GetVersion), () => CreateGetVersion(services)));
            GetResourceGroup  = source.AddAction(actions.Action(nameof(GetResourceGroup), () => CreateGetResourcegroup(services)));
        }
コード例 #4
0
        public AppUserGroup(AppApiGroup source, AppUserGroupFactory factory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index                = source.AddAction(actions.View(nameof(Index), factory.CreateIndex));
            GetUserRoles         = source.AddAction(actions.Action(nameof(GetUserRoles), factory.CreateGetUserRoles));
            GetUserRoleAccess    = source.AddAction(actions.Action(nameof(GetUserRoleAccess), factory.CreateGetUserRoleAccess));
            GetUserModCategories = source.AddAction(actions.Action(nameof(GetUserModCategories), factory.CreateGetUserModifierCategories));
        }
コード例 #5
0
        public UserListGroup(AppApiGroup source, UserListGroupFactory factory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index          = source.AddAction(actions.Action(nameof(Index), factory.CreateIndex));
            GetUsers       = source.AddAction(actions.Action(nameof(GetUsers), factory.CreateGetUsers));
            GetSystemUsers = source.AddAction(actions.Action(nameof(GetSystemUsers), factory.CreateGetSystemUsers));
            AddUser        = source.AddAction
                             (
                actions.Action
                (
                    nameof(AddUser),
                    Access.WithAllowed(HubInfo.Roles.AddUser),
                    factory.CreateAddUserValidation,
                    factory.CreateAddUser
                )
                             );
        }
コード例 #6
0
        public AppInquiryGroup(AppApiGroup source, AppInquiryActionFactory factory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index                    = source.AddAction(actions.View(nameof(Index), factory.CreateIndex));
            GetApp                   = source.AddAction(actions.Action(nameof(GetApp), factory.CreateGetApp));
            GetRoles                 = source.AddAction(actions.Action(nameof(GetRoles), factory.CreateGetRoles));
            GetRole                  = source.AddAction(actions.Action(nameof(GetRole), factory.CreateGetRole));
            GetResourceGroups        = source.AddAction(actions.Action(nameof(GetResourceGroups), factory.CreateGetResourceGroups));
            GetMostRecentRequests    = source.AddAction(actions.Action(nameof(GetMostRecentRequests), factory.CreateGetMostRecentRequests));
            GetMostRecentErrorEvents = source.AddAction(actions.Action(nameof(GetMostRecentErrorEvents), factory.CreateGetMostRecentErrorEvents));
            GetModifierCategories    = source.AddAction(actions.Action(nameof(GetModifierCategories), factory.CreateGetModifierCategories));
            GetModifierCategory      = source.AddAction(actions.Action(nameof(GetModifierCategory), factory.CreateGetModifierCategory));
            GetDefaultModiifer       = source.AddAction(actions.Action(nameof(GetDefaultModiifer), factory.CreateGetDefaultModifier));
        }
コード例 #7
0
    public EmployeeGroup(AppApiGroup source)
        : base(source)
    {
        var actions = new WebAppApiActionFactory(source);

        Index       = source.AddAction(actions.DefaultView());
        AddEmployee = source.AddAction
                      (
            actions.Action
            (
                nameof(AddEmployee),
                () => new AddEmployeeValidation(),
                () => new AddEmployeeAction()
            )
                      );
        AddEmployeeFormView = source.AddAction
                              (
            actions.PartialView
            (
                nameof(AddEmployeeFormView),
                () => new AddEmployeeFormViewAction()
            )
                              );
        AddEmployeeForm = source.AddAction
                          (
            actions.Action
            (
                nameof(AddEmployeeForm),
                () => new AddEmployeeFormAction()
            )
                          );
        Employee = source.AddAction
                   (
            actions.Action
            (
                nameof(Employee),
                () => new EmployeeAction(),
                "Get Employee Information"
            )
                   );
    }
コード例 #8
0
        public PermanentLogGroup(AppApiGroup source, PermanentLogGroupActionFactory actionFactory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            LogBatch            = source.AddAction(actions.Action(nameof(LogBatch), actionFactory.CreateLogBatch));
            StartSession        = source.AddAction(actions.Action(nameof(StartSession), actionFactory.CreateStartSession));
            StartRequest        = source.AddAction(actions.Action(nameof(StartRequest), actionFactory.CreateStartRequest));
            EndRequest          = source.AddAction(actions.Action(nameof(EndRequest), actionFactory.CreateEndRequest));
            EndSession          = source.AddAction(actions.Action(nameof(EndSession), actionFactory.CreateEndSession));
            LogEvent            = source.AddAction(actions.Action(nameof(LogEvent), actionFactory.CreateLogEvent));
            AuthenticateSession = source.AddAction(actions.Action(nameof(AuthenticateSession), actionFactory.CreateAuthenticateSession));
            EndExpiredSessions  = source.AddAction(actions.Action(nameof(EndExpiredSessions), actionFactory.CreateEndExpiredSessions));
        }
コード例 #9
0
ファイル: AuthGroup.cs プロジェクト: JasonBenfield/HubWebApp
        public AuthGroup(AppApiGroup source, AuthActionFactory actionFactory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index       = source.AddAction(actions.DefaultView());
            VerifyLogin = source.AddAction
                          (
                actions.Action
                (
                    nameof(VerifyLogin),
                    actionFactory.CreateVerifyLoginAction
                )
                          );
            VerifyLoginForm = source.AddAction
                              (
                actions.PartialView
                (
                    nameof(VerifyLoginForm),
                    () => new PartialViewAppAction <EmptyRequest>(nameof(VerifyLoginForm))
                )
                              );
            Login = source.AddAction
                    (
                actions.Action
                (
                    nameof(Login),
                    () => new LoginModelValidation(),
                    actionFactory.CreateLoginAction
                )
                    );
            Logout = source.AddAction
                     (
                actions.Action
                (
                    nameof(Logout),
                    actionFactory.CreateLogoutAction
                )
                     );
        }
コード例 #10
0
        public ResourceGroupInquiryGroup(AppApiGroup source, ResourceGroupInquiryActionFactory factory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            GetResourceGroup         = source.AddAction(actions.Action(nameof(GetResourceGroup), factory.CreateGetResourceGroup));
            GetResources             = source.AddAction(actions.Action(nameof(GetResources), factory.CreateGetResources));
            GetResource              = source.AddAction(actions.Action(nameof(GetResource), factory.CreateGetResource));
            GetRoleAccess            = source.AddAction(actions.Action(nameof(GetRoleAccess), factory.CreateGetResourceGroupRoleAccess));
            GetModCategory           = source.AddAction(actions.Action(nameof(GetModCategory), factory.CreateGetResourceGroupModCategory));
            GetMostRecentRequests    = source.AddAction(actions.Action(nameof(GetMostRecentRequests), factory.CreateGetMostRecentRequests));
            GetMostRecentErrorEvents = source.AddAction(actions.Action(nameof(GetMostRecentErrorEvents), factory.CreateGetMostRecentErrorEvents));
        }
コード例 #11
0
        public AuthApiGroup(AppApiGroup source, AuthActionFactory factory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Authenticate = source.AddAction
                           (
                actions.Action
                (
                    nameof(Authenticate),
                    () => new LoginValidation(),
                    factory.CreateAuthenticateAction
                )
                           );
        }
コード例 #12
0
        public AppRegistrationGroup(AppApiGroup source, IServiceProvider services)
            : base(source)
        {
            this.services = services;
            var actions = new WebAppApiActionFactory(source);

            RegisterApp   = source.AddAction(actions.Action(nameof(RegisterApp), createRegisterApp));
            NewVersion    = source.AddAction(actions.Action(nameof(NewVersion), createNewVersion));
            BeginPublish  = source.AddAction(actions.Action(nameof(BeginPublish), createBeginPublish));
            EndPublish    = source.AddAction(actions.Action(nameof(EndPublish), createEndPublish));
            GetVersions   = source.AddAction(actions.Action(nameof(GetVersions), createGetVersions));
            GetVersion    = source.AddAction(actions.Action(nameof(GetVersion), createGetVersion));
            AddSystemUser = source.AddAction(actions.Action(nameof(AddSystemUser), createAddSystemUser));
        }
コード例 #13
0
    public UserCacheGroup(AppApiGroup source, IServiceProvider sp) : base(source)
    {
        var actions = new WebAppApiActionFactory(source);

        ClearCache = source.AddAction
                     (
            actions.Action
            (
                nameof(ClearCache),
                () => new ClearCacheAction
                (
                    sp.GetRequiredService <ICachedUserContext>()
                )
            )
                     );
    }