Fixes dnx ef gen commands

This commit is contained in:
Paul Schneider 2019-01-08 16:12:38 +00:00
commit 11111125f8

View file

@ -83,10 +83,14 @@ namespace Yavsc
var googleClientFile = Configuration["Authentication:Google:GoogleWebClientJson"]; var googleClientFile = Configuration["Authentication:Google:GoogleWebClientJson"];
var googleServiceAccountJsonFile = Configuration["Authentication:Google:GoogleServiceAccountJson"]; var googleServiceAccountJsonFile = Configuration["Authentication:Google:GoogleServiceAccountJson"];
if (googleClientFile!=null)
GoogleWebClientConfiguration = new ConfigurationBuilder().AddJsonFile(googleClientFile).Build(); GoogleWebClientConfiguration = new ConfigurationBuilder().AddJsonFile(googleClientFile).Build();
if (googleServiceAccountJsonFile!=null)
{
var safile = new FileInfo(googleServiceAccountJsonFile); var safile = new FileInfo(googleServiceAccountJsonFile);
GServiceAccount = JsonConvert.DeserializeObject<GoogleServiceAccount>(safile.OpenText().ReadToEnd()); GServiceAccount = JsonConvert.DeserializeObject<GoogleServiceAccount>(safile.OpenText().ReadToEnd());
} }
}
public static string ConnectionString { get; set; } public static string ConnectionString { get; set; }
public static GoogleAuthSettings GoogleSettings { get; set; } public static GoogleAuthSettings GoogleSettings { get; set; }