Esempio n. 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"
            )
                  );
    }
Esempio n. 2
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"
            )
                   );
    }
Esempio n. 3
0
        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
                )
                     );
        }
Esempio n. 4
0
    public UserGroup(AppApiGroup source) : base(source)
    {
        var actions = new WebAppApiActionFactory(source);

        Index = source.AddAction(actions.DefaultView <UserStartRequest>());
    }