Skip to content

Commit

Permalink
[#108]
Browse files Browse the repository at this point in the history
- Remover a string de conexão rápida
  • Loading branch information
luca16s committed Apr 7, 2021
1 parent a69d154 commit 16cea88
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
14 changes: 5 additions & 9 deletions GameSaveManager.DesktopApp/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ public partial class App : Application

protected override void OnStartup(StartupEventArgs e)
{
string connectionType = Environment.GetEnvironmentVariable("CONNECTION_TYPE");
bool isFastConnectionEnable = string.IsNullOrEmpty(connectionType) ||
connectionType.ToLower(culture: CultureInfo.CurrentCulture) == "fast";

IConfigurationBuilder builder = new ConfigurationBuilder()
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
.AddJsonFile("gamelist.json", false, true);
Expand All @@ -43,7 +39,7 @@ protected override void OnStartup(StartupEventArgs e)

var servicesCollection = new ServiceCollection();

ConfigureServices(servicesCollection, isFastConnectionEnable);
ConfigureServices(servicesCollection);

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
ServiceProvider = servicesCollection.BuildServiceProvider();
Expand All @@ -52,7 +48,7 @@ protected override void OnStartup(StartupEventArgs e)
mainWindow.Show();
}

private void ConfigureServices(ServiceCollection servicesCollection, bool isFastConnectionEnable)
private void ConfigureServices(ServiceCollection servicesCollection)
{
_ = servicesCollection.AddTransient(typeof(AboutPage));
_ = servicesCollection.AddTransient(typeof(GamesPage));
Expand All @@ -70,9 +66,9 @@ private void ConfigureServices(ServiceCollection servicesCollection, bool isFast
{
secret.AppKey = Configuration.GetSection(key: nameof(Secrets.AppKey)).Value;
secret.AppSecret = Configuration.GetSection(key: nameof(Secrets.AppSecret)).Value;
secret.AppToken = (Debugger.IsAttached && isFastConnectionEnable)
? Configuration.GetSection(key: nameof(Secrets.AppToken)).Value
: string.Empty;
secret.AppToken = Debugger.IsAttached
? Configuration.GetSection(key: nameof(Secrets.AppToken)).Value
: string.Empty;
});

_ = servicesCollection
Expand Down
5 changes: 1 addition & 4 deletions GameSaveManager.DesktopApp/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"profiles": {
"GameSaveManager.DesktopApp": {
"commandName": "Project",
"environmentVariables": {
"CONNECTION_TYPE": "fast"
}
"commandName": "Project"
}
}
}
24 changes: 12 additions & 12 deletions GameSaveManager.sln
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Global
{424334CE-AC67-4787-9F57-10AAC281C3FC}.Release|ARM64.Build.0 = Release|Any CPU
{424334CE-AC67-4787-9F57-10AAC281C3FC}.Release|x64.ActiveCfg = Release|x64
{424334CE-AC67-4787-9F57-10AAC281C3FC}.Release|x64.Build.0 = Release|x64
{424334CE-AC67-4787-9F57-10AAC281C3FC}.Release|x86.ActiveCfg = Release|Any CPU
{424334CE-AC67-4787-9F57-10AAC281C3FC}.Release|x86.Build.0 = Release|Any CPU
{424334CE-AC67-4787-9F57-10AAC281C3FC}.Release|x86.ActiveCfg = Release|x64
{424334CE-AC67-4787-9F57-10AAC281C3FC}.Release|x86.Build.0 = Release|x64
{E9827BB3-A371-4859-A704-897CF2C2C19B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E9827BB3-A371-4859-A704-897CF2C2C19B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9827BB3-A371-4859-A704-897CF2C2C19B}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand All @@ -72,8 +72,8 @@ Global
{E9827BB3-A371-4859-A704-897CF2C2C19B}.Release|ARM64.Build.0 = Release|Any CPU
{E9827BB3-A371-4859-A704-897CF2C2C19B}.Release|x64.ActiveCfg = Release|x64
{E9827BB3-A371-4859-A704-897CF2C2C19B}.Release|x64.Build.0 = Release|x64
{E9827BB3-A371-4859-A704-897CF2C2C19B}.Release|x86.ActiveCfg = Release|Any CPU
{E9827BB3-A371-4859-A704-897CF2C2C19B}.Release|x86.Build.0 = Release|Any CPU
{E9827BB3-A371-4859-A704-897CF2C2C19B}.Release|x86.ActiveCfg = Release|x64
{E9827BB3-A371-4859-A704-897CF2C2C19B}.Release|x86.Build.0 = Release|x64
{C397732E-9D13-412E-B108-A936E2EC386A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C397732E-9D13-412E-B108-A936E2EC386A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C397732E-9D13-412E-B108-A936E2EC386A}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand All @@ -92,8 +92,8 @@ Global
{C397732E-9D13-412E-B108-A936E2EC386A}.Release|ARM64.Build.0 = Release|Any CPU
{C397732E-9D13-412E-B108-A936E2EC386A}.Release|x64.ActiveCfg = Release|x64
{C397732E-9D13-412E-B108-A936E2EC386A}.Release|x64.Build.0 = Release|x64
{C397732E-9D13-412E-B108-A936E2EC386A}.Release|x86.ActiveCfg = Release|Any CPU
{C397732E-9D13-412E-B108-A936E2EC386A}.Release|x86.Build.0 = Release|Any CPU
{C397732E-9D13-412E-B108-A936E2EC386A}.Release|x86.ActiveCfg = Release|x64
{C397732E-9D13-412E-B108-A936E2EC386A}.Release|x86.Build.0 = Release|x64
{E8187961-8230-44DB-B67B-965B0D43E820}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E8187961-8230-44DB-B67B-965B0D43E820}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E8187961-8230-44DB-B67B-965B0D43E820}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand All @@ -112,8 +112,8 @@ Global
{E8187961-8230-44DB-B67B-965B0D43E820}.Release|ARM64.Build.0 = Release|Any CPU
{E8187961-8230-44DB-B67B-965B0D43E820}.Release|x64.ActiveCfg = Release|x64
{E8187961-8230-44DB-B67B-965B0D43E820}.Release|x64.Build.0 = Release|x64
{E8187961-8230-44DB-B67B-965B0D43E820}.Release|x86.ActiveCfg = Release|Any CPU
{E8187961-8230-44DB-B67B-965B0D43E820}.Release|x86.Build.0 = Release|Any CPU
{E8187961-8230-44DB-B67B-965B0D43E820}.Release|x86.ActiveCfg = Release|x64
{E8187961-8230-44DB-B67B-965B0D43E820}.Release|x86.Build.0 = Release|x64
{C93088E6-5BC4-4967-BDDF-8704A2341A35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C93088E6-5BC4-4967-BDDF-8704A2341A35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C93088E6-5BC4-4967-BDDF-8704A2341A35}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand All @@ -132,8 +132,8 @@ Global
{C93088E6-5BC4-4967-BDDF-8704A2341A35}.Release|ARM64.Build.0 = Release|Any CPU
{C93088E6-5BC4-4967-BDDF-8704A2341A35}.Release|x64.ActiveCfg = Release|x64
{C93088E6-5BC4-4967-BDDF-8704A2341A35}.Release|x64.Build.0 = Release|x64
{C93088E6-5BC4-4967-BDDF-8704A2341A35}.Release|x86.ActiveCfg = Release|Any CPU
{C93088E6-5BC4-4967-BDDF-8704A2341A35}.Release|x86.Build.0 = Release|Any CPU
{C93088E6-5BC4-4967-BDDF-8704A2341A35}.Release|x86.ActiveCfg = Release|x64
{C93088E6-5BC4-4967-BDDF-8704A2341A35}.Release|x86.Build.0 = Release|x64
{81468A12-D005-40AD-AAD8-B66A5888CF9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81468A12-D005-40AD-AAD8-B66A5888CF9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81468A12-D005-40AD-AAD8-B66A5888CF9F}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand All @@ -152,8 +152,8 @@ Global
{81468A12-D005-40AD-AAD8-B66A5888CF9F}.Release|ARM64.Build.0 = Release|Any CPU
{81468A12-D005-40AD-AAD8-B66A5888CF9F}.Release|x64.ActiveCfg = Release|x64
{81468A12-D005-40AD-AAD8-B66A5888CF9F}.Release|x64.Build.0 = Release|x64
{81468A12-D005-40AD-AAD8-B66A5888CF9F}.Release|x86.ActiveCfg = Release|Any CPU
{81468A12-D005-40AD-AAD8-B66A5888CF9F}.Release|x86.Build.0 = Release|Any CPU
{81468A12-D005-40AD-AAD8-B66A5888CF9F}.Release|x86.ActiveCfg = Release|x64
{81468A12-D005-40AD-AAD8-B66A5888CF9F}.Release|x86.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 16cea88

Please sign in to comment.