public T Get <T>() where T : class { T result = default(T); if (typeof(T) == typeof(ISettingsServiceImplementation)) { if (this.settingsServiceImplementation == null) { this.settingsServiceImplementation = new SettingsServiceImplementation(); } result = (T)this.settingsServiceImplementation; } return(result); }
public SettingsService(IDependencyService dependencyService) { _settingsServiceImpl = dependencyService.Get <ISettingsServiceImplementation>(); }
public DependencyService(ISettingsServiceImplementation settingsServiceImplementation) { this.settingsServiceImplementation = settingsServiceImplementation; }
public SettingsService(IDependencyService dependencyService = null) { _settingsServiceImpl = (dependencyService ?? Locator.Current.GetService <IDependencyService>()).Get <ISettingsServiceImplementation>(); }