This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Use top level statements + file scoped namespaces
- Loading branch information
1 parent
9e03c40
commit c4fac36
Showing
7 changed files
with
481 additions
and
494 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace ClashOfClans.App.Examples | ||
namespace ClashOfClans.App.Examples; | ||
|
||
public class GoldPassExamples | ||
{ | ||
public class GoldPassExamples | ||
{ | ||
private readonly string token; | ||
private readonly string _token; | ||
|
||
public GoldPassExamples(string token) | ||
{ | ||
this.token = token; | ||
} | ||
public GoldPassExamples(string token) | ||
{ | ||
_token = token; | ||
} | ||
|
||
/// <summary> | ||
/// Get information about the current gold pass season. | ||
/// </summary> | ||
public async Task GetCurrentGoldPassSeason() | ||
{ | ||
var coc = new ClashOfClansClient(token); | ||
var currentGoldPassSeason = await coc.GoldPass.GetCurrentGoldPassSeasonAsync(); | ||
/// <summary> | ||
/// Get information about the current gold pass season. | ||
/// </summary> | ||
public async Task GetCurrentGoldPassSeason() | ||
{ | ||
var coc = new ClashOfClansClient(_token); | ||
var currentGoldPassSeason = await coc.GoldPass.GetCurrentGoldPassSeasonAsync(); | ||
|
||
Console.WriteLine($"Current GoldPass season started '{currentGoldPassSeason.StartTime.ToLocalTime()}'" + | ||
$" and ends '{currentGoldPassSeason.EndTime.ToLocalTime()}'"); | ||
} | ||
Console.WriteLine($"Current GoldPass season started '{currentGoldPassSeason.StartTime.ToLocalTime()}'" + | ||
$" and ends '{currentGoldPassSeason.EndTime.ToLocalTime()}'"); | ||
} | ||
} |
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
Oops, something went wrong.