/// <summary> /// Internal for testing purposes only /// </summary> internal static ICredentialStore GetStoreForOS(LinuxCredentialStore.StoreConfig config) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return(new Win32CredentialStore()); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { return(new OSXCredentialStore()); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { return(new LinuxCredentialStore(config)); } throw new InvalidOperationException("Platform not currently supported"); }
/// <summary> /// Internal for testing purposes only /// </summary> internal CredentialService(ICredentialStore store, LinuxCredentialStore.StoreConfig config) { this.credStore = store != null ? store : GetStoreForOS(config); }