/// <summary> /// Constructor. /// </summary> /// /// <exception cref="ArgumentNullException"> Thrown when one or more required arguments are null. </exception> /// /// <param name="messengerService"> The messenger service. This cannot be null. </param> /// <param name="localisationService"> The localisation service. This cannot be null. </param> /// <param name="traceService"> The trace service. This cannot be null. </param> /// <param name="logger"> The logger. This cannot be null. </param> /// <param name="messageFactory"> The message factory. This cannot be null. </param> /// <param name="dateTimeService"> The date time service. This cannot be null. </param> public LoggingServiceSingleton( [NotNull] IMessengerService messengerService, [NotNull] ILocalisationService localisationService, [NotNull] ITraceService traceService, [NotNull] ILogger logger, [NotNull] IMessageFactory messageFactory, [NotNull] IDateTimeService dateTimeService) { if (logger is null) { throw new ArgumentNullException(nameof(logger)); } _messengerService = messengerService ?? throw new ArgumentNullException(nameof(messengerService)); _localisationService = localisationService ?? throw new ArgumentNullException(nameof(localisationService)); _traceService = traceService ?? throw new ArgumentNullException(nameof(traceService)); _messageFactory = messageFactory ?? throw new ArgumentNullException(nameof(messageFactory)); _dateTimeService = dateTimeService ?? throw new ArgumentNullException(nameof(dateTimeService)); _logActionDictionary = new Dictionary <MessageLevelEnum, Action <string> >(6) { { MessageLevelEnum.Verbose, logger.Verbose }, { MessageLevelEnum.Debug, logger.Debug }, { MessageLevelEnum.Information, logger.Information }, { MessageLevelEnum.Warning, logger.Warning }, { MessageLevelEnum.Error, logger.Error }, { MessageLevelEnum.Fatal, logger.Fatal } }; }
private void InitialiseCulture() { IPlatformProvider platformProvider = container.GetInstance <IPlatformProvider>(); if (platformProvider.PlatformInfo.PlatformType != PlatformTypeEnum.AppleIOS || platformProvider.PlatformInfo.PlatformType != PlatformTypeEnum.Android) { return; } ILocalisationService localise = container.GetInstance <ILocalisationService>(); localise.SetCulture(localise.GetCurrentCultureInfo()); }
public async Task <IActionResult> GetBadgeStatusAsync( [FromServices] ILocalisationService localisationService, [FromRoute] string languageId) { int progress = await localisationService.GetLanguageProgressAsync(languageId); string progressSvg = await GetProgressImageAsync(progress); if (progressSvg == null) { return(new StatusCodeResult(404)); } return(Content(progressSvg, MimeTypes.ImageSvgXml)); }
protected XFrame( ILifetimeScope c, ILoadStatusService systemTrayService, IOrientationService orientationService, ILocalisationService localisationService, IXNavigation xNavigationService, IDispatcher dispatcher) { _loadStatusService = systemTrayService; _orientationService = orientationService; _localisationService = localisationService; _navigation = xNavigationService; Dispatcher = dispatcher; Container = c; Id = Guid.NewGuid(); }
public XRootFrame(ILifetimeScope c, ILoadStatusService systemTrayService, IOrientationService orientationService, ILocalisationService localisationService, IXNavigation xNavigationService, IDispatcher dispatcher) : base(c, systemTrayService, orientationService, localisationService, xNavigationService, dispatcher) { }
public SettingsService(ILocalisationService localisationService, IStorageService storageService) { _localisationService = localisationService; _storageService = storageService; GetSettingsAsync().ConfigureAwait(false); }
public XEntry() { _localisationService = ContainerHost.Container.Resolve <ILocalisationService>(); }
public XEntry() { _localisationService = ContainerHost.Container.Resolve<ILocalisationService>(); }
public LocaleRouteConstraint(ILocalisationService localisationService) { this._localisationService = localisationService; }
public ContractService(ILocalisationService localisationService, IStorageService storageService) { _localisationService = localisationService; _storageService = storageService; // GetContractsAsync().ConfigureAwait(false); }
public CustomersViewModel(CustomerService customerService, ILocalisationService localisationService) { _customerService = customerService; _localisationService = localisationService; }
public LocalisationTextsController(ILocalisationService localisationService) { _localisationService = localisationService; }
public LocalisationZipCodeResolver(ILocalisationService localisationService) => _localisationService = localisationService;
/// <summary> /// Initialises a specific .Net Resource file with localised strings to application culture through localisation service. /// </summary> private void InitialiseLocalisedResourceFileWithCulture(out CultureInfo targetCultureInResourceFile) { ILocalisationService localise = container.GetInstance <ILocalisationService>(); targetCultureInResourceFile = localise.GetCurrentCultureInfo(); }