/// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="coreBaseResourceErrors">Ядро. Основа. Ресурсы. Ошибки.</param>
        /// <param name="resourceSuccesses">Ресурсы. Успехи.</param>
        /// <param name="resourceErrors">Ресурсы. Ошибки.</param>
        /// <param name="service">Сервис.</param>
        public ModIdentityServerWebMvcPartAccountJobs(
            CoreBaseResourceErrors coreBaseResourceErrors,
            ModIdentityServerBaseResourceSuccesses resourceSuccesses,
            ModIdentityServerBaseResourceErrors resourceErrors,
            ModIdentityServerWebMvcPartAccountService service
            )
        {
            JobLoginGet = new ModIdentityServerWebMvcPartAccountJobLoginGetService(
                service.GetLogin,
                coreBaseResourceErrors
                );

            JobLoginPost = new ModIdentityServerWebMvcPartAccountJobLoginPostService(
                service.PostLogin,
                coreBaseResourceErrors,
                resourceSuccesses,
                resourceErrors
                );

            JobLogoutGet = new ModIdentityServerWebMvcPartAccountJobLogoutGetService(
                service.GetLogout,
                coreBaseResourceErrors
                );

            JobLogoutPost = new ModIdentityServerWebMvcPartAccountJobLogoutPostService(
                service.PostLogout,
                coreBaseResourceErrors
                );
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Конструктор.
 /// </summary>
 /// <param name="resourceTitlesLocalizer">Локализатор ресурсов заголовков.</param>
 public ModIdentityServerBaseResources(
     IStringLocalizer <ModIdentityServerBaseResourceErrors> resourceErrorsLocalizer,
     IStringLocalizer <ModIdentityServerBaseResourceSuccesses> resourceSuccessesLocalizer,
     IStringLocalizer <ModIdentityServerBaseResourceTitles> resourceTitlesLocalizer
     )
 {
     Errors    = new ModIdentityServerBaseResourceErrors(resourceErrorsLocalizer);
     Successes = new ModIdentityServerBaseResourceSuccesses(resourceSuccessesLocalizer);
     Titles    = new ModIdentityServerBaseResourceTitles(resourceTitlesLocalizer);
 }
        /// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="executable">Выполняемое.</param>
        /// <param name="coreBaseResourceErrors">Ядро. Основа. Ресурсы. Ошибки.</param>
        public ModIdentityServerWebMvcPartAccountJobLoginPostService(
            Func <ModIdentityServerWebMvcPartAccountJobLoginPostInput, Task <ModIdentityServerWebMvcPartAccountCommonJobLoginOutput> > executable,
            CoreBaseResourceErrors coreBaseResourceErrors,
            ModIdentityServerBaseResourceSuccesses resourceSuccesses,
            ModIdentityServerBaseResourceErrors resourceErrors
            ) : base(executable, coreBaseResourceErrors)
        {
            ResourceSuccesses = resourceSuccesses;
            ResourceErrors    = resourceErrors;

            Execution.FuncTransformInput     = TransformInput;
            Execution.FuncGetSuccessMessages = GetSuccessMessages;
            Execution.FuncGetErrorMessages   = GetErrorMessages;
        }