示例#1
0
 /// <summary>Initializes a new instance of the <see cref="CSharpControllerGenerator" /> class.</summary>
 /// <param name="document">The Swagger document.</param>
 /// <param name="settings">The settings.</param>
 /// <param name="resolver">The resolver.</param>
 /// <exception cref="ArgumentNullException"><paramref name="document" /> is <see langword="null" />.</exception>
 public CSharpControllerGenerator(OpenApiDocument document, CSharpControllerGeneratorSettings settings, CSharpTypeResolver resolver)
     : base(document, settings, resolver)
 {
     _document = document ?? throw new ArgumentNullException(nameof(document));
     Settings  = settings ?? throw new ArgumentNullException(nameof(settings));
 }
示例#2
0
 /// <summary>Initializes a new instance of the <see cref="CSharpControllerGenerator" /> class.</summary>
 /// <param name="document">The Swagger document.</param>
 /// <param name="settings">The settings.</param>
 /// <exception cref="ArgumentNullException"><paramref name="document" /> is <see langword="null" />.</exception>
 public CSharpControllerGenerator(OpenApiDocument document, CSharpControllerGeneratorSettings settings)
     : this(document, settings, CreateResolverWithExceptionSchema(settings.CSharpGeneratorSettings, document))
 {
 }