Example #1
0
        /// <summary>Initializes a new instance of the <see cref="ResponseModel" /> class.</summary>
        /// <param name="response">The response.</param>
        /// <param name="clientGeneratorBase">The client generator base.</param>
        public ResponseModel(KeyValuePair <string, SwaggerResponse> response, ClientGeneratorBase clientGeneratorBase)
        {
            _response            = response.Value;
            _clientGeneratorBase = clientGeneratorBase;

            StatusCode = response.Key;
        }
Example #2
0
        /// <summary>Initializes a new instance of the <see cref="ResponseModel" /> class.</summary>
        /// <param name="response">The response.</param>
        /// <param name="exceptionSchema">The exception schema.</param>
        /// <param name="clientGeneratorBase">The client generator base.</param>
        public ResponseModel(KeyValuePair <string, SwaggerResponse> response, JsonSchema4 exceptionSchema, ClientGeneratorBase clientGeneratorBase)
        {
            _response            = response.Value;
            _exceptionSchema     = exceptionSchema;
            _clientGeneratorBase = clientGeneratorBase;

            StatusCode = response.Key;
        }
Example #3
0
        /// <summary>Initializes a new instance of the <see cref="ResponseModel" /> class.</summary>
        /// <param name="response">The response.</param>
        /// <param name="exceptionSchema">The exception schema.</param>
        /// <param name="clientGeneratorBase">The client generator base.</param>
        public ResponseModel(KeyValuePair<string, SwaggerResponse> response, JsonSchema4 exceptionSchema, ClientGeneratorBase clientGeneratorBase)
        {
            _response = response.Value;
            _exceptionSchema = exceptionSchema;
            _clientGeneratorBase = clientGeneratorBase;

            StatusCode = response.Key;
        }
Example #4
0
 /// <summary>Initializes a new instance of the <see cref="ParameterModel" /> class.</summary>
 /// <param name="typeName">The type name.</param>
 /// <param name="operation">The operation.</param>
 /// <param name="parameter">The parameter.</param>
 /// <param name="settings">The settings.</param>
 /// <param name="clientGeneratorBase">The client generator base.</param>
 public ParameterModel(string typeName, SwaggerOperation operation, SwaggerParameter parameter,
                       CodeGeneratorSettingsBase settings, ClientGeneratorBase clientGeneratorBase)
 {
     Type                 = typeName;
     _operation           = operation;
     _parameter           = parameter;
     _settings            = settings;
     _clientGeneratorBase = clientGeneratorBase;
 }
Example #5
0
 /// <summary>Initializes a new instance of the <see cref="FileTemplateModel" /> class.</summary>
 /// <param name="clientCode">The client code.</param>
 /// <param name="outputType">Type of the output.</param>
 /// <param name="document">The Swagger document.</param>
 /// <param name="clientGeneratorBase">The client generator base.</param>
 /// <param name="settings">The settings.</param>
 /// <param name="resolver">The resolver.</param>
 public FileTemplateModel(string clientCode, ClientGeneratorOutputType outputType, SwaggerDocument document,
                          ClientGeneratorBase clientGeneratorBase, SwaggerToCSharpGeneratorSettings settings, SwaggerToCSharpTypeResolver resolver)
 {
     _clientCode          = clientCode;
     _outputType          = outputType;
     _document            = document;
     _clientGeneratorBase = clientGeneratorBase;
     _settings            = settings;
     _resolver            = resolver;
 }
Example #6
0
 /// <summary>Initializes a new instance of the <see cref="FileTemplateModel" /> class.</summary>
 /// <param name="clientCode">The client code.</param>
 /// <param name="outputType">Type of the output.</param>
 /// <param name="document">The Swagger document.</param>
 /// <param name="clientGeneratorBase">The client generator base.</param>
 /// <param name="settings">The settings.</param>
 /// <param name="resolver">The resolver.</param>
 public FileTemplateModel(string clientCode, ClientGeneratorOutputType outputType, SwaggerDocument document,
     ClientGeneratorBase clientGeneratorBase, SwaggerToCSharpGeneratorSettings settings, SwaggerToCSharpTypeResolver resolver)
 {
     _clientCode = clientCode;
     _outputType = outputType;
     _document = document;
     _clientGeneratorBase = clientGeneratorBase;
     _settings = settings;
     _resolver = resolver;
 }
Example #7
0
        /// <summary>Initializes a new instance of the <see cref="ParameterModel" /> class.</summary>
        /// <param name="typeName">The type name.</param>
        /// <param name="operation">The operation.</param>
        /// <param name="parameter">The parameter.</param>
        /// <param name="parameterName">Name of the parameter.</param>
        /// <param name="variableName">Name of the variable.</param>
        /// <param name="settings">The settings.</param>
        /// <param name="clientGeneratorBase">The client generator base.</param>
        public ParameterModel(string typeName, SwaggerOperation operation, SwaggerParameter parameter, 
            string parameterName, string variableName, CodeGeneratorSettingsBase settings, ClientGeneratorBase clientGeneratorBase)
        {
            Type = typeName;
            Name = parameterName;
            VariableName = variableName;

            _operation = operation;
            _parameter = parameter;
            _settings = settings;
            _clientGeneratorBase = clientGeneratorBase;
        }
Example #8
0
 public ResponseModel(ClientGeneratorBase clientGeneratorBase)
 {
     _clientGeneratorBase = clientGeneratorBase;
 }