예제 #1
0
 public AuthenticateController(
     IAuthenticateActions authenticateActions,
     IProfileActions profileActions,
     IDataProtectionProvider dataProtectionProvider,
     IEncoder encoder,
     ITranslationManager translationManager,
     IOpenIdEventSource simpleIdentityServerEventSource,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccessor,
     IEventPublisher eventPublisher,
     IAuthenticationService authenticationService,
     IAuthenticationSchemeProvider authenticationSchemeProvider,
     IUserActions userActions,
     IPayloadSerializer payloadSerializer,
     IConfigurationService configurationService,
     IAuthenticateHelper authenticateHelper,
     IResourceOwnerAuthenticateHelper resourceOwnerAuthenticateHelper,
     ITwoFactorAuthenticationHandler twoFactorAuthenticationHandler,
     BasicAuthenticateOptions basicAuthenticateOptions) : base(authenticateActions, profileActions, dataProtectionProvider, encoder,
                                                               translationManager, simpleIdentityServerEventSource, urlHelperFactory, actionContextAccessor, eventPublisher,
                                                               authenticationService, authenticationSchemeProvider, userActions, payloadSerializer, configurationService,
                                                               authenticateHelper, twoFactorAuthenticationHandler, basicAuthenticateOptions)
 {
     _resourceOwnerAuthenticateHelper = resourceOwnerAuthenticateHelper;
 }
 public AuthenticateController(
     IOpenidAuthenticateResourceOwnerAction openidAuthenticateResourceOwnerAction,
     IProfileActions profileActions,
     IDataProtectionProvider dataProtectionProvider,
     IEncoder encoder,
     ITranslationManager translationManager,
     IOpenIdEventSource simpleIdentityServerEventSource,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccessor,
     IEventPublisher eventPublisher,
     IAuthenticationService authenticationService,
     IAuthenticationSchemeProvider authenticationSchemeProvider,
     IUserActions userActions,
     IPayloadSerializer payloadSerializer,
     IConfigurationService configurationService,
     IAuthenticateHelper authenticateHelper,
     IResourceOwnerAuthenticateHelper resourceOwnerAuthenticateHelper,
     IChangePasswordAction changePasswordAction,
     ILoginPwdAuthenticateAction loginPwdAuthenticateAction,
     LoginPasswordOptions basicAuthenticateOptions) : base(openidAuthenticateResourceOwnerAction, profileActions, dataProtectionProvider, encoder,
                                                           translationManager, simpleIdentityServerEventSource, urlHelperFactory, actionContextAccessor, eventPublisher,
                                                           authenticationService, authenticationSchemeProvider, userActions, payloadSerializer, configurationService,
                                                           authenticateHelper, basicAuthenticateOptions)
 {
     _resourceOwnerAuthenticateHelper = resourceOwnerAuthenticateHelper;
     _changePasswordAction            = changePasswordAction;
     _loginPwdAuthenticateAction      = loginPwdAuthenticateAction;
 }
 public UserController(
     IUserActions userActions,
     ITranslationManager translationManager)
 {
     _userActions        = userActions;
     _translationManager = translationManager;
 }
예제 #4
0
 public AuthenticateController(
     IAuthenticateActions authenticateActions,
     IDataProtectionProvider dataProtectionProvider,
     IEncoder encoder,
     ITranslationManager translationManager,
     ISimpleIdentityServerEventSource simpleIdentityServerEventSource,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccessor,
     IEventPublisher eventPublisher,
     IAuthenticationService authenticationService,
     IAuthenticationSchemeProvider authenticationSchemeProvider,
     IUserActions userActions,
     IPayloadSerializer payloadSerializer,
     AuthenticateOptions authenticateOptions,
     IConfigurationService configurationService,
     IAuthenticateHelper authenticateHelper) : base(authenticationService, authenticateOptions)
 {
     _authenticateActions             = authenticateActions;
     _dataProtector                   = dataProtectionProvider.CreateProtector("Request");
     _encoder                         = encoder;
     _translationManager              = translationManager;
     _simpleIdentityServerEventSource = simpleIdentityServerEventSource;
     _urlHelper                       = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext);
     _eventPublisher                  = eventPublisher;
     _payloadSerializer               = payloadSerializer;
     _authenticationSchemeProvider    = authenticationSchemeProvider;
     _configurationService            = configurationService;
     _authenticateHelper              = authenticateHelper;
 }
예제 #5
0
 public BaseAuthenticateController(
     IOpenidAuthenticateResourceOwnerAction openidAuthenticateResourceOwnerAction,
     IProfileActions profileActions,
     IDataProtectionProvider dataProtectionProvider,
     IEncoder encoder,
     ITranslationManager translationManager,
     IOpenIdEventSource simpleIdentityServerEventSource,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccessor,
     IEventPublisher eventPublisher,
     IAuthenticationService authenticationService,
     IAuthenticationSchemeProvider authenticationSchemeProvider,
     IUserActions userActions,
     IPayloadSerializer payloadSerializer,
     IConfigurationService configurationService,
     IAuthenticateHelper authenticateHelper,
     BasicAuthenticateOptions basicAuthenticateOptions) : base(authenticationService)
 {
     _openidAuthenticateResourceOwnerAction = openidAuthenticateResourceOwnerAction;
     _profileActions     = profileActions;
     _dataProtector      = dataProtectionProvider.CreateProtector("Request");
     _encoder            = encoder;
     _translationManager = translationManager;
     _simpleIdentityServerEventSource = simpleIdentityServerEventSource;
     _urlHelper                    = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext);
     _eventPublisher               = eventPublisher;
     _payloadSerializer            = payloadSerializer;
     _authenticationSchemeProvider = authenticationSchemeProvider;
     _userActions                  = userActions;
     _configurationService         = configurationService;
     _authenticateHelper           = authenticateHelper;
     _basicAuthenticateOptions     = basicAuthenticateOptions;
 }
예제 #6
0
        public ApplicationManager(IMessengerManager messenger, ITranslationManager translation, IConfigurationManager configuration, IUserManager user, 
                                  INotifyIconManager notifyIcon, IEventLogManager logger, IControllerConfigurationManager controller, IThemeManager theme)
        {
            Messenger = messenger;
            Translation = translation;
            Configuration = configuration;
            User = user;
            NotifyIcon = notifyIcon;
            Logger = logger;
            Controller = controller;
            Theme = theme;

            Logger.Initialize(Constants.SERVICE_NAME);
            Logger.Subscribe(param => Messenger.NotifyColleagues(AppMessages.NEW_LOG_MESSAGE, param.Entry));

            string a = Configuration.GetData(ConfOptions.OPTION_ACCENT);
            string t = Configuration.GetData(ConfOptions.OPTION_THEME);
            Theme.SetTheme(a, t);

            Translation.ChangeLanguage(Configuration.GetData(ConfOptions.OPTION_LANGUAGE));

            DuplexChannelFactory<ISubscribingService> pipeFactory = new DuplexChannelFactory<ISubscribingService>(new ServiceCommand(Messenger),
                new NetNamedPipeBinding(), new EndpointAddress(Constants.PIPE_ADDRESS + Constants.SERVICE_NAME));
            Service = pipeFactory.CreateChannel();
            Service.Subscribe();
        }
예제 #7
0
        private void Awake()
        {
            if (_Instance != null)
            {
                Destroy(gameObject);
                return;
            }

            if (isDontDestroyOnLoad)
            {
                DontDestroyOnLoad(gameObject);
            }

            _Instance = this;

            _serviceLocator = new ServiceLocator();
            _serviceLocator.InitServices();

            _translationManager = _serviceLocator.Get <ITranslationManager>();

            _translationManager.TranslateSuccessEvent      += TranslateSuccessEventHandler;
            _translationManager.DetectLanguageSuccessEvent += DetectLanguageSuccessEventHandler;
            _translationManager.GetLanguagesSuccessEvent   += GetLanguagesSuccessEventHandler;

            _translationManager.TranslateFailedEvent      += TranslateFailedEventHandler;
            _translationManager.DetectLanguageFailedEvent += DetectLanguageFailedEventHandler;
            _translationManager.GetLanguagesFailedEvent   += GetLanguagesFailedEventHandler;

            _translationManager.ContentOutOfLengthEvent += ContentOutOfLengthEventHandler;
        }
예제 #8
0
 public AuthenticateController(
     IOpenidAuthenticateResourceOwnerAction openidAuthenticateResourceOwnerAction,
     IProfileActions profileActions,
     IDataProtectionProvider dataProtectionProvider,
     IEncoder encoder,
     ITranslationManager translationManager,
     IOpenIdEventSource simpleIdentityServerEventSource,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccessor,
     IEventPublisher eventPublisher,
     IAuthenticationService authenticationService,
     IAuthenticationSchemeProvider authenticationSchemeProvider,
     IUserActions userActions,
     IPayloadSerializer payloadSerializer,
     IConfigurationService configurationService,
     IAuthenticateHelper authenticateHelper,
     ISmsAuthenticationOperation smsAuthenticationOperation,
     IGenerateAndSendSmsCodeOperation generateAndSendSmsCodeOperation,
     IResourceOwnerAuthenticateHelper resourceOwnerAuthenticateHelper,
     SmsAuthenticationOptions basicAuthenticateOptions) : base(openidAuthenticateResourceOwnerAction, profileActions, dataProtectionProvider, encoder,
                                                               translationManager, simpleIdentityServerEventSource, urlHelperFactory, actionContextAccessor, eventPublisher,
                                                               authenticationService, authenticationSchemeProvider, userActions, payloadSerializer, configurationService,
                                                               authenticateHelper, basicAuthenticateOptions)
 {
     _smsAuthenticationOperation      = smsAuthenticationOperation;
     _generateAndSendSmsCodeOperation = generateAndSendSmsCodeOperation;
     _resourceOwnerAuthenticateHelper = resourceOwnerAuthenticateHelper;
 }
예제 #9
0
        public InfoRecord[] GetInfoRecords(ITranslationManager tm)
        {
            const string tg      = "Statistics";
            var          records = new List <InfoRecord>
            {
                new InfoRecord
                {
                    Name  = tm.T(tg, "Type"),
                    Value = InstrType.ToString()
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Comment"),
                    Value = Comment
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Digits"),
                    Value = Digits.ToString(CultureInfo.InvariantCulture)
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Point value"),
                    Value = Point.ToString("0.#####")
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Lot size"),
                    Value = LotSize.ToString(CultureInfo.InvariantCulture)
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Spread"),
                    Value = Spread.ToString("F2") + " " + tm.T(tg, "points")
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Swap long"),
                    Value = SwapLong.ToString("F2") + " " + tm.T(tg, SwapType.ToString().ToLower())
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Swap short"),
                    Value = SwapShort.ToString("F2") + " " + tm.T(tg, SwapType.ToString().ToLower())
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Commission"),
                    Value = Commission.ToString("F2") + " " + tm.T(tg, CommissionType.ToString().ToLower())
                },
                new InfoRecord
                {
                    Name  = tm.T(tg, "Slippage"),
                    Value = Slippage.ToString("F2") + " " + tm.T(tg, "points")
                }
            };

            return(records.ToArray());
        }
예제 #10
0
 public Translator(ITranslationManager translationManager, 
     string word, out ManualResetEvent doneEvent)
 {
     doneEvent = new ManualResetEvent(false);
     this.doneEvent = doneEvent;
     this.word = word;
     this.translationManager = translationManager;
 }
예제 #11
0
 protected BaseLoader(IServiceContainer serviceContainer)
 {
     httpContextAccessor = serviceContainer.GetService <IHttpContextAccessor>();
     translationManager  = serviceContainer.GetService <ITranslationManager>();
     configuration       = serviceContainer.GetService <IConfiguration>();
     languageProvider    = serviceContainer.GetService <IBaseProvider <Language> >();
     userProvider        = serviceContainer.GetService <IUserProvider>();
 }
예제 #12
0
 public AuthenticateController(
     IAuthenticateActions authenticateActions,
     IDataProtectionProvider dataProtectionProvider,
     ITranslationManager translationManager)
 {
     _dataProtector       = dataProtectionProvider.CreateProtector("Request");
     _authenticateActions = authenticateActions;
 }
예제 #13
0
 public AdminController(IServiceContainer serviceContainer)
     : base(serviceContainer)
 {
     this.authentication     = serviceContainer.GetService <IAuthenticationClient>();
     this.translationManager = serviceContainer.GetService <ITranslationManager>();
     this.languageProvider   = serviceContainer.GetService <IBaseProvider <Language> >();
     this.userProvider       = serviceContainer.GetService <IUserProvider>();
 }
예제 #14
0
 private void InitializeFakeObjects()
 {
     _simpleIdentityServerConfiguratorFake = new Mock <IConfigurationService>();
     _translationRepositoryFake            = new Mock <ITranslationRepository>();
     _translationManager = new TranslationManager(
         _simpleIdentityServerConfiguratorFake.Object,
         _translationRepositoryFake.Object);
 }
예제 #15
0
 public UserController(IServiceContainer serviceContainer)
     : base(serviceContainer)
 {
     this.translationManager = serviceContainer.GetService <ITranslationManager>();
     this.permissionProvider = serviceContainer.GetService <IPermissionProvider>();
     this.userProvider       = serviceContainer.GetService <IUserProvider>();
     this.userRoleProvider   = serviceContainer.GetService <IBaseProvider <UserRole> >();
     this.userService        = serviceContainer.GetService <IBaseService <User> >();
     this.userRoleService    = serviceContainer.GetService <IBaseService <UserRole> >();
 }
예제 #16
0
 public UserController(IUserActions userActions, IProfileActions profileActions, ITranslationManager translationManager,
                       IAuthenticationService authenticationService, IAuthenticationSchemeProvider authenticationSchemeProvider,
                       IUrlHelperFactory urlHelperFactory, IActionContextAccessor actionContextAccessor, ITwoFactorAuthenticationHandler twoFactorAuthenticationHandler) : base(authenticationService)
 {
     _userActions                  = userActions;
     _profileActions               = profileActions;
     _translationManager           = translationManager;
     _authenticationSchemeProvider = authenticationSchemeProvider;
     _urlHelper = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext);
     _twoFactorAuthenticationHandler = twoFactorAuthenticationHandler;
 }
예제 #17
0
 public PasswordResetProcessor(IServiceContainer serviceContainer)
     : base(serviceContainer)
 {
     this.userProvider        = serviceContainer.GetService <IUserProvider>();
     this.userService         = serviceContainer.GetService <IBaseService <User> >();
     this.mailQueueService    = serviceContainer.GetService <IMailQueueService>();
     this.razorLightEngine    = serviceContainer.GetService <IRazorLightEngine>();
     this.reloader            = serviceContainer.GetServices <IReloader <PasswordResetViewModel> >().First();
     this.translationManager  = serviceContainer.GetService <ITranslationManager>();
     this.httpContextAccessor = serviceContainer.GetService <IHttpContextAccessor>();
 }
예제 #18
0
 public HomeController(IUserActions userActions, IProfileActions profileActions, ITranslationManager translationManager,
                       IAuthenticationService authenticationService, IAuthenticationSchemeProvider authenticationSchemeProvider,
                       IUrlHelperFactory urlHelperFactory, IActionContextAccessor actionContextAccessor,
                       IEnumerable <IAuthModule> authModules, UserManagementOptions userManagementOptions) : base(authenticationService)
 {
     _userActions                  = userActions;
     _profileActions               = profileActions;
     _translationManager           = translationManager;
     _authenticationSchemeProvider = authenticationSchemeProvider;
     _urlHelper             = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext);
     _authModules           = authModules;
     _userManagementOptions = userManagementOptions;
 }
 public ConsentController(
     IConsentActions consentActions,
     IDataProtectionProvider dataProtectionProvider,
     ITranslationManager translationManager,
     IEventPublisher eventPublisher,
     IEventAggregateRepository eventAggregateRepository)
 {
     _consentActions           = consentActions;
     _dataProtector            = dataProtectionProvider.CreateProtector("Request");
     _translationManager       = translationManager;
     _eventPublisher           = eventPublisher;
     _eventAggregateRepository = eventAggregateRepository;
 }
예제 #20
0
 public ConsentController(
     IConsentActions consentActions,
     IDataProtectionProvider dataProtectionProvider,
     ITranslationManager translationManager,
     IEventPublisher eventPublisher,
     IAuthenticationService authenticationService,
     IPayloadSerializer payloadSerializer) : base(authenticationService)
 {
     _consentActions     = consentActions;
     _dataProtector      = dataProtectionProvider.CreateProtector("Request");
     _translationManager = translationManager;
     _eventPublisher     = eventPublisher;
     _payloadSerializer  = payloadSerializer;
 }
예제 #21
0
        public MainWindowViewModel(IUserManager userManager, IConfigurationManager configurationManager, ITranslationManager translationManager, INotifyIconManager iconManager, 
                                   IControllerConfigurationManager controllerConfigurationManager, IThemeManager themeManager, IMessengerManager messengerManager)
        {
            UserManager = userManager;
            ConfigurationManager = configurationManager;
            TranslationManager = translationManager;
            IconManager = iconManager;
            ControllerConfigurationManager = controllerConfigurationManager;
            ThemeManager = themeManager;
            MessengerManager = messengerManager;

            MessengerManager.Register<ControllerContract>(AppMessages.CONTROLLER_CHANGE_STATUS, param => ControllerChangeStatus(param));
            MessengerManager.Register<EventLogEntry>(AppMessages.NEW_LOG_MESSAGE, param => AddLogMessage(param));

            //App.AppManager.RegisterControllerChange(param => ControllerChangeStatus(param));
            //App.AppManager.RegisterNewLogMessage(param => AddLogMessage(param));
        }
 public ConsentController(
     IConsentActions consentActions,
     IDataProtectionProvider dataProtectionProvider,
     ITranslationManager translationManager,
     IEventPublisher eventPublisher,
     IEventAggregateRepository eventAggregateRepository,
     IAuthenticationService authenticationService,
     IUserActions usersAction,
     IPayloadSerializer payloadSerializer,
     AuthenticateOptions authenticateOptions) : base(authenticationService, authenticateOptions)
 {
     _consentActions           = consentActions;
     _dataProtector            = dataProtectionProvider.CreateProtector("Request");
     _translationManager       = translationManager;
     _eventPublisher           = eventPublisher;
     _eventAggregateRepository = eventAggregateRepository;
     _payloadSerializer        = payloadSerializer;
 }
 public AuthenticateController(
     IAuthenticateActions authenticateActions,
     IDataProtectionProvider dataProtectionProvider,
     IEncoder encoder,
     ITranslationManager translationManager,
     ISimpleIdentityServerEventSource simpleIdentityServerEventSource,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccessor,
     IEventAggregateRepository eventAggregateRepository,
     IEventPublisher eventPublisher)
 {
     _authenticateActions             = authenticateActions;
     _dataProtector                   = dataProtectionProvider.CreateProtector("Request");
     _encoder                         = encoder;
     _translationManager              = translationManager;
     _simpleIdentityServerEventSource = simpleIdentityServerEventSource;
     _urlHelper                       = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext);
     _eventAggregateRepository        = eventAggregateRepository;
     _eventPublisher                  = eventPublisher;
 }
예제 #24
0
        public string ToString(ITranslationManager tm)
        {
            var stringBuilder = new StringBuilder();

            foreach (ListParam listParam in ListParam)
            {
                if (listParam.Enabled)
                {
                    stringBuilder.AppendLine(
                        String.Format("{0}: {1}", tm.TranslateIndicatorParam(listParam.Caption, IndicatorName),
                                      tm.TranslateIndicatorParam(listParam.Text, IndicatorName)));
                }
            }

            foreach (NumericParam numParam in NumParam)
            {
                if (numParam.Enabled)
                {
                    stringBuilder.AppendLine(
                        String.Format("{0}: {1}", tm.TranslateIndicatorParam(numParam.Caption, IndicatorName),
                                      numParam.ValueToString));
                }
            }

            foreach (CheckParam checkParam in CheckParam)
            {
                if (checkParam.Enabled)
                {
                    stringBuilder.AppendLine(
                        String.Format("{0}: {1}", tm.TranslateIndicatorParam(checkParam.Caption, IndicatorName),
                                      (checkParam.Checked ? tm.T("Statistics", "Yes") : tm.T("Statistics", "No"))));
                }
            }

            return(stringBuilder.ToString());
        }
예제 #25
0
 public ITranslator CreateTranslator(ITranslationManager translationManager, string word, out ManualResetEvent mre)
 {
     return new Translator(translationManager, word, out mre);
 }
 public UserController(IUserActions userActions, ITranslationManager translationManager, IAuthenticationService authenticationService, AuthenticateOptions options) : base(authenticationService, options)
 {
     _userActions        = userActions;
     _translationManager = translationManager;
 }
예제 #27
0
        public string ToString(ITranslationManager tm)
        {
            var stringBuilder = new StringBuilder();

            foreach (ListParam listParam in ListParam)
                if (listParam.Enabled)
                    stringBuilder.AppendLine(
                        String.Format("{0}: {1}", tm.TranslateIndicatorParam(listParam.Caption, IndicatorName),
                            tm.TranslateIndicatorParam(listParam.Text, IndicatorName)));

            foreach (NumericParam numParam in NumParam)
                if (numParam.Enabled)
                    stringBuilder.AppendLine(
                        String.Format("{0}: {1}", tm.TranslateIndicatorParam(numParam.Caption, IndicatorName),
                            numParam.ValueToString));

            foreach (CheckParam checkParam in CheckParam)
                if (checkParam.Enabled)
                    stringBuilder.AppendLine(
                        String.Format("{0}: {1}", tm.TranslateIndicatorParam(checkParam.Caption, IndicatorName),
                            (checkParam.Checked ? tm.T("Statistics", "Yes") : tm.T("Statistics", "No"))));

            return stringBuilder.ToString();
        }
        public InfoRecord[] GetInfoRecords(ITranslationManager tm)
        {
            const string tg = "Statistics";
            var records = new List<InfoRecord>
            {
                new InfoRecord
                {
                    Name = tm.T(tg, "Type"),
                    Value = InstrType.ToString()
                },
                new InfoRecord
                {
                    Name = tm.T(tg, "Comment"),
                    Value = Comment
                },
                new InfoRecord
                {
                    Name = tm.T(tg, "Digits"),
                    Value = Digits.ToString(CultureInfo.InvariantCulture)
                },
                new InfoRecord
                {
                    Name = tm.T(tg, "Point value"),
                    Value = Point.ToString("0.#####")
                },
                new InfoRecord
                {
                    Name = tm.T(tg, "Lot size"),
                    Value = LotSize.ToString(CultureInfo.InvariantCulture)
                },
                new InfoRecord
                {
                    Name = tm.T(tg, "Spread"),
                    Value = Spread.ToString("F2") + " " + tm.T(tg, "points")
                },
                new InfoRecord
                {
                    Name = tm.T(tg, "Swap long"),
                    Value = SwapLong.ToString("F2") + " " + tm.T(tg, SwapType.ToString().ToLower())
                },
                new InfoRecord
                {
                    Name = tm.T(tg, "Swap short"),
                    Value = SwapShort.ToString("F2") + " " + tm.T(tg, SwapType.ToString().ToLower())
                },
                new InfoRecord
                {
                    Name = tm.T(tg, "Commission"),
                    Value = Commission.ToString("F2") + " " + tm.T(tg, CommissionType.ToString().ToLower())
                },
                new InfoRecord
                {
                    Name = tm.T(tg, "Slippage"),
                    Value = Slippage.ToString("F2") + " " + tm.T(tg, "points")
                }
            };

            return records.ToArray();
        }
예제 #29
0
 public PasswordResetValidator(IServiceContainer serviceContainer)
     : base(serviceContainer)
 {
     this.translationManager = serviceContainer.GetService <ITranslationManager>();
 }
예제 #30
0
 public static void RemoveListener(ITranslationManager source, IWeakEventListener listener)
 {
     CurrentManager.ProtectedRemoveListener(source, listener);
 }
예제 #31
0
 public SignInValidator(IServiceContainer serviceContainer)
     : base(serviceContainer)
 {
     this.translationManager = serviceContainer.GetService <ITranslationManager>();
 }
 public EditCredentialController(IAuthenticationService authenticationService, ITranslationManager translationManager,
                                 IChangePasswordAction changePasswordAction) : base(authenticationService)
 {
     _translationManager   = translationManager;
     _changePasswordAction = changePasswordAction;
 }
예제 #33
0
 public RoleValidator(IServiceContainer serviceContainer)
     : base(serviceContainer)
 {
     this.permissionProvider = serviceContainer.GetService <IPermissionProvider>();
     this.translationManager = serviceContainer.GetService <ITranslationManager>();
 }
예제 #34
0
 /// <summary>
 /// Create a new instance of <see cref="AutofacLanguageServiceProvider"/>.
 /// </summary>
 /// <param name="manager"></param>
 /// <param name="processor"></param>
 public AutofacLanguageServiceProvider(ITranslationManager manager, TranslationProcessor processor)
 {
     _translationManager   = manager ?? throw new ArgumentNullException(nameof(manager));
     _translationProcessor = processor ?? throw new ArgumentNullException(nameof(processor));
 }
예제 #35
0
파일: RoadHelper.cs 프로젝트: Jos1k/Roads
 /// <summary>
 /// Fills the AddRoadModel.
 /// </summary>
 /// <param name="manager">The ITranslationManager manager.</param>
 /// <param name="userLanguages">The user languages string.</param>
 /// <returns>The <see cref="AddRoadModel"/> with default placeholders.</returns>
 public static AddRoadModel FillAddRoadModel(IRoadsService client, AddRoadModel model, ITranslationManager manager, string userLanguages)
 {
     int searchingDepth = client.GetSearchingDepth();
     model.SearchingDepth = searchingDepth;
     model.CityPoints = new List<City>
     {
         new City
         {
             Placeholder =
                 manager.GetLabelTranslation("ARS1_Placeholder_From",
                     CultureHelper.GetCulture(userLanguages))
         },
         new City
         {
             Placeholder =
                 manager.GetLabelTranslation("ARS1_Placeholder_To",
                     CultureHelper.GetCulture(userLanguages))
         }
     };
     return model;
 }
예제 #36
0
 public UserValidator(IServiceContainer serviceContainer)
     : base(serviceContainer)
 {
     this.userProvider       = serviceContainer.GetService <IUserProvider>();
     this.translationManager = serviceContainer.GetService <ITranslationManager>();
 }