public string GetConfigFile(WellKnownConfigFile configFile) { string path; switch (configFile) { case WellKnownConfigFile.Runner: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".agent"); break; case WellKnownConfigFile.Credentials: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".credentials"); break; case WellKnownConfigFile.RSACredentials: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".credentials_rsaparams"); break; case WellKnownConfigFile.Service: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".service"); break; case WellKnownConfigFile.CredentialStore: #if OS_OSX path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".credential_store.keychain"); #else path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".credential_store"); #endif break; case WellKnownConfigFile.Certificates: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".certificates"); break; case WellKnownConfigFile.Options: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".options"); break; case WellKnownConfigFile.SetupInfo: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".setup_info"); break; default: throw new NotSupportedException($"Unexpected well known config file: '{configFile}'"); } _trace.Info($"Well known config file '{configFile}': '{path}'"); return(path); }
public string GetConfigFile(WellKnownConfigFile configFile) { string path; switch (configFile) { case WellKnownConfigFile.Agent: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".agent"); break; case WellKnownConfigFile.Credentials: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".credentials"); break; case WellKnownConfigFile.RSACredentials: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".credentials_rsaparams"); break; case WellKnownConfigFile.Service: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".service"); break; case WellKnownConfigFile.CredentialStore: if (PlatformUtil.RunningOnMacOS) { path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".credential_store.keychain"); } else { path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".credential_store"); } break; case WellKnownConfigFile.Certificates: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".certificates"); break; case WellKnownConfigFile.Proxy: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".proxy"); break; case WellKnownConfigFile.ProxyCredentials: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".proxycredentials"); break; case WellKnownConfigFile.ProxyBypass: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".proxybypass"); break; case WellKnownConfigFile.Autologon: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".autologon"); break; case WellKnownConfigFile.Options: path = Path.Combine( GetDirectory(WellKnownDirectory.Root), ".options"); break; default: throw new NotSupportedException($"Unexpected well known config file: '{configFile}'"); } _trace.Info($"Well known config file '{configFile}': '{path}'"); return(path); }