Skip to content

Commit

Permalink
Remove unnecessary obsolete destructors.
Browse files Browse the repository at this point in the history
  • Loading branch information
ProIcons committed Feb 1, 2021
1 parent bbf47b1 commit 61a7d88
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ public AuthenticationManager(IConfigurationRoot config)
_httpClient = new HttpClient();
}

~AuthenticationManager()
{
Dispose(false);
}

public bool IsTokenAboutToExpire() => Token.ExpiresAt <= DateTime.Now.AddSeconds(20);

private async Task GetAuthToken()
Expand Down
5 changes: 0 additions & 5 deletions SpotNetCore/SpotNetCore/Implementation/CommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public CommandHandler(AuthenticationManager authenticationManager, PlayerService
_playerService = playerService;
_searchService = searchService;
}

~CommandHandler()
{
Dispose(false);
}

public async Task HandleCommands()
{
Expand Down
5 changes: 0 additions & 5 deletions SpotNetCore/SpotNetCore/Services/AlbumService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ public AlbumService(AuthenticationManager authenticationManager)
};
}

~AlbumService()
{
Dispose(false);
}

public async Task<IEnumerable<SpotifyTrack>> GetTracksFromAlbumCollection(IEnumerable<SpotifyAlbum> albums)
{
if (albums.IsNullOrEmpty())
Expand Down
5 changes: 0 additions & 5 deletions SpotNetCore/SpotNetCore/Services/ArtistService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ public ArtistService(AuthenticationManager authenticationManager)
}
};
}

~ArtistService()
{
Dispose(false);
}

public async Task<IEnumerable<SpotifyTrack>> GetTopTracksForArtist(string id)
{
Expand Down
5 changes: 0 additions & 5 deletions SpotNetCore/SpotNetCore/Services/PlayerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ public PlayerService(AuthenticationManager authenticationManager)
};
}

~PlayerService()
{
Dispose(false);
}

public async Task PlayCurrentTrack()
{
var response = await _httpClient.PutAsync("https://api.spotify.com/v1/me/player/play", null);
Expand Down
5 changes: 0 additions & 5 deletions SpotNetCore/SpotNetCore/Services/PlaylistService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ public PlaylistService(AuthenticationManager authenticationManager)
};
}

~PlaylistService()
{
Dispose(false);
}

public async Task<IEnumerable<SpotifyTrack>> GetTracksInPlaylist(string id)
{
var response = await _httpClient.GetAsync($"https://api.spotify.com/v1/playlists/{id}/tracks?market=GB");
Expand Down
5 changes: 0 additions & 5 deletions SpotNetCore/SpotNetCore/Services/SearchService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ public SearchService(AuthenticationManager authenticationManager, ArtistService
};
}

~SearchService()
{
Dispose(false);
}

public async Task<IEnumerable<SpotifyTrack>> SearchForTrack(string query)
{
var response = await _httpClient.GetAsync($"https://api.spotify.com/v1/search?q={query}&type=track");
Expand Down

0 comments on commit 61a7d88

Please sign in to comment.