Skip to content

Commit

Permalink
Add guard against null options
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhelle committed Jun 14, 2019
1 parent 37ca882 commit ad3535e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public NSwagCSharpCodeGenerator(string swaggerFile, string defaultNamespace, INS
{
this.swaggerFile = swaggerFile ?? throw new ArgumentNullException(nameof(swaggerFile));
this.defaultNamespace = defaultNamespace ?? throw new ArgumentNullException(nameof(defaultNamespace));
this.options = new NSwagCSharpOptions(options);
this.options = new NSwagCSharpOptions(options ?? throw new ArgumentNullException(nameof(options)));
}

public string GenerateCode(IVsGeneratorProgress pGenerateProgress)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class NSwagStudioCodeGenerator : ICodeGenerator
public NSwagStudioCodeGenerator(string nswagStudioFile, IGeneralOptions options)
{
this.nswagStudioFile = nswagStudioFile ?? throw new ArgumentNullException(nameof(nswagStudioFile));
this.options = new CustomPathOptions(options);
this.options = new CustomPathOptions(options ?? throw new ArgumentNullException(nameof(options)));
}

public string GenerateCode(IVsGeneratorProgress pGenerateProgress)
Expand Down

0 comments on commit ad3535e

Please sign in to comment.