Created
July 8, 2017 23:31
-
-
Save dance2die/1efad8bdf3f3ae4217fd1aadc5423b8d to your computer and use it in GitHub Desktop.
Using Environment variables to access API key values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace MyAnimeListSharp.Auth | |
{ | |
public class CredentialContext : ICredentialContext | |
{ | |
public string UserName { get; set; } = | |
Environment.GetEnvironmentVariable("Project_MyAnimeList.UserName", EnvironmentVariableTarget.User); | |
public string Password { get; set; } = | |
Environment.GetEnvironmentVariable("Project_MyAnimeList.Password", EnvironmentVariableTarget.User); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment