Skip to content

Commit

Permalink
chore: fix redundant names (IDE0020)
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev committed Jul 29, 2023
1 parent 5289ac0 commit 556d1fd
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/Docfx.Build.Engine/DocumentBuildContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ public IImmutableList<string> GetTocFileKeySet(string key)
public void RegisterToc(string tocFileKey, string fileKey)
{
#if NET7_0_OR_GREATER
ArgumentNullException.ThrowIfNullOrEmpty(fileKey);
ArgumentNullException.ThrowIfNullOrEmpty(tocFileKey);
ArgumentException.ThrowIfNullOrEmpty(fileKey);
ArgumentException.ThrowIfNullOrEmpty(tocFileKey);
#else
if (string.IsNullOrEmpty(fileKey)) throw new ArgumentNullException(nameof(fileKey));
if (string.IsNullOrEmpty(tocFileKey)) throw new ArgumentNullException(nameof(tocFileKey));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void ProcessTheme(string outputDirectory, bool overwrite)
private bool TryExportResourceFiles(IEnumerable<string> resourceNames, string outputDirectory, bool overwrite, string? regexFilter = null)
{
#if NET7_0_OR_GREATER
ArgumentNullException.ThrowIfNullOrEmpty(outputDirectory);
ArgumentException.ThrowIfNullOrEmpty(outputDirectory);
#else
if (string.IsNullOrEmpty(outputDirectory))
throw new ArgumentNullException(nameof(outputDirectory));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public TemplateProcessor(ResourceFileReader resourceProvider, DocumentBuildConte
public TemplateBundle GetTemplateBundle(string documentType)
{
#if NET7_0_OR_GREATER
ArgumentNullException.ThrowIfNullOrEmpty(documentType);
ArgumentException.ThrowIfNullOrEmpty(documentType);
#else
if (string.IsNullOrEmpty(documentType)) throw new ArgumentNullException(nameof(documentType));
#endif
Expand All @@ -55,7 +55,7 @@ public TemplateBundle GetTemplateBundle(string documentType)
public bool TryGetFileExtension(string documentType, out string fileExtension)
{
#if NET7_0_OR_GREATER
ArgumentNullException.ThrowIfNullOrEmpty(documentType);
ArgumentException.ThrowIfNullOrEmpty(documentType);
#else
if (string.IsNullOrEmpty(documentType)) throw new ArgumentNullException(nameof(documentType));
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/Docfx.Build.TableOfContents/TocHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static IEnumerable<FileModel> Resolve(ImmutableList<FileModel> models, IH
public static TocItemViewModel LoadSingleToc(string file)
{
#if NET7_0_OR_GREATER
ArgumentNullException.ThrowIfNullOrEmpty(file);
ArgumentException.ThrowIfNullOrEmpty(file);
#else
if (string.IsNullOrEmpty(file))
{
Expand Down Expand Up @@ -100,7 +100,7 @@ public static TocItemViewModel LoadSingleToc(string file)
public static TocItemViewModel LoadYamlToc(string file)
{
#if NET7_0_OR_GREATER
ArgumentNullException.ThrowIfNullOrEmpty(file);
ArgumentException.ThrowIfNullOrEmpty(file);
#else
if (string.IsNullOrEmpty(file))
{
Expand Down
2 changes: 1 addition & 1 deletion src/Docfx.Common/Git/GitUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static string RawContentUrlToContentUrl(string rawUrl)
public static GitRepoInfo Parse(string repoUrl)
{
#if NET7_0_OR_GREATER
ArgumentNullException.ThrowIfNullOrEmpty(repoUrl);
ArgumentException.ThrowIfNullOrEmpty(repoUrl);
#else
if (string.IsNullOrEmpty(repoUrl))
{
Expand Down
2 changes: 1 addition & 1 deletion src/Docfx.Common/Path/RelativePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public string GetFileNameWithoutExtension()
public RelativePath ChangeFileName(string fileName)
{
#if NET7_0_OR_GREATER
ArgumentNullException.ThrowIfNullOrEmpty(fileName);
ArgumentException.ThrowIfNullOrEmpty(fileName);
#else
if (string.IsNullOrEmpty(fileName))
{
Expand Down
2 changes: 1 addition & 1 deletion src/Docfx.MarkdigEngine/MarkdigMarkdownService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public MarkupResult Markup(string content, string filePath, bool multipleYamlHea
ArgumentNullException.ThrowIfNull(content);

#if NET7_0_OR_GREATER
ArgumentNullException.ThrowIfNullOrEmpty(filePath);
ArgumentException.ThrowIfNullOrEmpty(filePath);
#else
if(string.IsNullOrEmpty(filePath))
throw new ArgumentNullException(nameof(filePath));
Expand Down

0 comments on commit 556d1fd

Please sign in to comment.