public LicensesViewModel(ILicenseProvider licenseProvider) { Ensure.Argument.IsNotNull(licenseProvider, nameof(licenseProvider)); Licenses = licenseProvider.GetAppLicenses() .Select(keyValuePair => new License(keyValuePair.Key, keyValuePair.Value)) .ToImmutableList(); }
private static void CheckLicenseProvider() { if (_licenseProvider != null) return; lock (_syncRoot) { if (_licenseProvider != null) return; _licenseProvider = LicenseProviderExtensionPoint.CreateInstance(); _licenseProvider.LicenseInfoChanged += (s, e) => EventsHelper.Fire(_licenseChanged, null, e); } }
public static Foundation Create( string clientName, string version, ITogglDatabase database, ITimeService timeService, IScheduler scheduler, IMailService mailService, IGoogleService googleService, ApiEnvironment apiEnvironment, ILicenseProvider licenseProvider, IAnalyticsService analyticsService, IPlatformConstants platformConstants, IApplicationShortcutCreator shortcutCreator, ISuggestionProviderContainer suggestionProviderContainer) { Ensure.Argument.IsNotNull(version, nameof(version)); Ensure.Argument.IsNotNull(database, nameof(database)); Ensure.Argument.IsNotNull(clientName, nameof(clientName)); Ensure.Argument.IsNotNull(timeService, nameof(timeService)); Ensure.Argument.IsNotNull(scheduler, nameof(scheduler)); Ensure.Argument.IsNotNull(mailService, nameof(mailService)); Ensure.Argument.IsNotNull(googleService, nameof(googleService)); Ensure.Argument.IsNotNull(licenseProvider, nameof(licenseProvider)); Ensure.Argument.IsNotNull(shortcutCreator, nameof(shortcutCreator)); Ensure.Argument.IsNotNull(analyticsService, nameof(analyticsService)); Ensure.Argument.IsNotNull(platformConstants, nameof(platformConstants)); Ensure.Argument.IsNotNull(suggestionProviderContainer, nameof(suggestionProviderContainer)); var userAgent = new UserAgent(clientName, version.ToString()); var foundation = new Foundation { Database = database, UserAgent = userAgent, TimeService = timeService, Scheduler = scheduler, MailService = mailService, GoogleService = googleService, ApiEnvironment = apiEnvironment, LicenseProvider = licenseProvider, Version = Version.Parse(version), ShortcutCreator = shortcutCreator, AnalyticsService = analyticsService, PlatformConstants = platformConstants, BackgroundService = new BackgroundService(timeService), ApiFactory = new ApiFactory(apiEnvironment, userAgent), SuggestionProviderContainer = suggestionProviderContainer }; return(foundation); }
private static void CheckLicenseProvider() { if (_licenseProvider != null) { return; } lock (_syncRoot) { if (_licenseProvider != null) { return; } _licenseProvider = LicenseProviderExtensionPoint.CreateInstance(); _licenseProvider.LicenseInfoChanged += (s, e) => EventsHelper.Fire(_licenseChanged, null, e); } }
public Builder WithLicenseProvider(ILicenseProvider licenseProvider) { LicenseProvider = licenseProvider; return(this); }
public LicensesController(ILicenseProvider licenseProvider, MainViewModel mainViewModel, IStepProvider stepProvider, string stepName, ILoggerFactory loggerFactory) : base(mainViewModel, stepProvider, stepName, loggerFactory) { LicenseProvider = licenseProvider; }
public LicensesViewModel(ILicenseProvider licenseProvider) { Ensure.Argument.IsNotNull(licenseProvider, nameof(licenseProvider)); this.licenseProvider = licenseProvider; }
public UsageTracker(ILicenseProvider provider, ITransportService transportService) { this.LicenseProvider = provider; this.TransportService = transportService; }