Skip to content

Commit 5321cec

Browse files
authored
Fix ReSharper's "Use string interpolation expression" and "Replace if statement with null-propagating code" / Code Smell (#240)
1 parent bde2663 commit 5321cec

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

dropbox-sdk-dotnet/Dropbox.Api/DropboxAppClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private static string GetBasicAuthHeader(string appKey, string appSecret)
6262
throw new ArgumentNullException("appSecret");
6363
}
6464

65-
var rawValue = string.Format("{0}:{1}", appKey, appSecret);
65+
var rawValue = $"{appKey}:{appSecret}";
6666
return Convert.ToBase64String(Encoding.UTF8.GetBytes(rawValue));
6767
}
6868
}

dropbox-sdk-dotnet/Dropbox.Api/DropboxRequestHandler.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,7 @@ private async Task<Result> RequestJsonStringWithRetry(
430430
}
431431
finally
432432
{
433-
if (body != null)
434-
{
435-
body.Dispose();
436-
}
433+
body?.Dispose();
437434
}
438435
}
439436

0 commit comments

Comments
 (0)