Changed all == null to is null and all !(* == null) to * is not null

This commit is contained in:
Kwoth
2021-06-19 08:24:09 +02:00
parent 81406cb46a
commit d8c7cdc7f4
125 changed files with 367 additions and 366 deletions

View File

@@ -64,7 +64,7 @@ namespace NadekoBot.Modules.Music.Resolvers
yield break;
var firstData = await ResolveByQueryAsync(firstFile);
if (!(firstData is null))
if (firstData is not null)
yield return firstData;
var fileChunks = files.Skip(1).Chunk(10);

View File

@@ -81,7 +81,7 @@ namespace NadekoBot.Modules.Music.Resolvers
public async Task<ITrackInfo?> ResolveByQueryAsync(string query)
{
var cached = await _trackCacher.GetCachedDataByQueryAsync(query, MusicPlatform.SoundCloud);
if (!(cached is null))
if (cached is not null)
return CachableDataToTrackInfo(cached);
var svideo = !IsSoundCloudLink(query)

View File

@@ -199,7 +199,7 @@
// //Log.Information("Buffered. Getting audio client...");
// var ac = await GetAudioClient().ConfigureAwait(false);
// Log.Information("Got Audio client");
// if (ac == null)
// if (ac is null)
// {
// Log.Information("Can't join");
// await Task.Delay(900, cancelToken).ConfigureAwait(false);
@@ -371,7 +371,7 @@
//
// private async Task<IAudioClient> GetAudioClient(bool reconnect = false)
// {
// if (_audioClient == null ||
// if (_audioClient is null ||
// _audioClient.ConnectionState != ConnectionState.Connected ||
// reconnect ||
// newVoiceChannel)
@@ -529,7 +529,7 @@
// {
// lock (locker)
// {
// if (PauseTaskSource == null)
// if (PauseTaskSource is null)
// PauseTaskSource = new TaskCompletionSource<bool>();
// else
// {

View File

@@ -86,7 +86,7 @@
// if (MaxQueueSize != 0 && Songs.Count >= MaxQueueSize)
// throw new QueueFullException();
// var curSong = Current.Song;
// if (curSong == null)
// if (curSong is null)
// {
// Songs.AddLast(song);
// return Songs.Count;