Пример #1
0
        /// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="coreBaseResourceErrors">Ядро. Основа. Ресурсы. Ошибки.</param>
        /// <param name="resourceSuccesses">Ресурсы. Успехи.</param>
        /// <param name="resourceErrors">Ресурсы. Ошибки.</param>
        /// <param name="service">Сервис.</param>
        public ModAuthBaseJobs(
            CoreBaseResourceErrors coreBaseResourceErrors,
            ModAuthBaseResourceSuccesses resourceSuccesses,
            ModAuthBaseResourceErrors resourceErrors,
            ModAuthBaseService service
            )
        {
            JobLoginJwt = new ModAuthBaseJobLoginJwtService(
                service.JwtLogin,
                coreBaseResourceErrors,
                resourceSuccesses,
                resourceErrors
                );

            JobRefreshJwt = new ModAuthBaseJobRefreshJwtService(
                service.JwtRefresh,
                coreBaseResourceErrors,
                resourceSuccesses,
                resourceErrors
                );

            JobRegister = new ModAuthBaseJobRegisterService(
                service.Register,
                coreBaseResourceErrors,
                resourceSuccesses,
                resourceErrors
                );
        }
Пример #2
0
 /// <summary>
 /// Конструктор.
 /// </summary>
 /// <param name="resourceErrorsLocalizer">Локализатор ресурсов ошибок.</param>
 /// <param name="resourceSuccessesLocalizer">Локализатор ресурсов успехов.</param>
 public ModAuthBaseResources(
     IStringLocalizer <ModAuthBaseResourceErrors> resourceErrorsLocalizer,
     IStringLocalizer <ModAuthBaseResourceSuccesses> resourceSuccessesLocalizer
     )
 {
     Errors    = new ModAuthBaseResourceErrors(resourceErrorsLocalizer);
     Successes = new ModAuthBaseResourceSuccesses(resourceSuccessesLocalizer);
 }
        /// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="executable">Выполняемое.</param>
        /// <param name="coreBaseResourceErrors">Ядро. Основа. Ресурсы. Ошибки.</param>
        /// <param name="resourceSuccesses">Ресурсы успехов.</param>
        /// <param name="resourceErrors">Ресурсы ошибок.</param>
        public ModAuthBaseJobRegisterService(
            Func <ModAuthBaseJobRegisterInput, Task <HostBasePartAuthUser> > executable,
            CoreBaseResourceErrors coreBaseResourceErrors,
            ModAuthBaseResourceSuccesses resourceSuccesses,
            ModAuthBaseResourceErrors resourceErrors
            ) : base(executable, coreBaseResourceErrors)
        {
            ResourceSuccesses = resourceSuccesses;
            ResourceErrors    = resourceErrors;

            Execution.FuncTransformInput     = TransformInput;
            Execution.FuncGetSuccessMessages = GetSuccessMessages;
            Execution.FuncGetErrorMessages   = GetErrorMessages;
        }
Пример #4
0
        /// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="executable">Выполняемое.</param>
        /// <param name="coreBaseResourceErrors">Ядро. Основа. Ресурсы. Ошибки.</param>
        /// <param name="resourceSuccesses">Ресурсы успехов.</param>
        /// <param name="resourceErrors">Ресурсы ошибок.</param>
        public ModAuthBaseJobLoginJwtService(
            Func <ModAuthBaseCommonJobLoginInput, Task <ModAuthBaseCommonJobLoginJwtOutput> > executable,
            CoreBaseResourceErrors coreBaseResourceErrors,
            ModAuthBaseResourceSuccesses resourceSuccesses,
            ModAuthBaseResourceErrors resourceErrors
            ) : base(executable, coreBaseResourceErrors)
        {
            ResourceSuccesses = resourceSuccesses;
            ResourceErrors    = resourceErrors;

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