public AddHeadersMethodGenerator(IMediaTypeSelector mediaTypeSelector, INameFormatterSelector nameFormatterSelector,
                                  ISerializationNamespace serializationNamespace)
 {
     MediaTypeSelector      = mediaTypeSelector ?? throw new ArgumentNullException(nameof(mediaTypeSelector));
     NameFormatterSelector  = nameFormatterSelector ?? throw new ArgumentNullException(nameof(nameFormatterSelector));
     SerializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
 }
 public BuildContentMethodGenerator(ISerializationNamespace serializationNamespace,
                                    IMediaTypeSelector mediaTypeSelector)
 {
     SerializationNamespace =
         serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
     MediaTypeSelector = mediaTypeSelector ?? throw new ArgumentNullException(nameof(mediaTypeSelector));
 }
예제 #3
0
 public GetBodyMethodGenerator(IMediaTypeSelector mediaTypeSelector, GenerationContext context,
                               ISerializationNamespace serializationNamespace)
 {
     MediaTypeSelector      = mediaTypeSelector ?? throw new ArgumentNullException(nameof(mediaTypeSelector));
     Context                = context ?? throw new ArgumentNullException(nameof(context));
     SerializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
 }
        public JsonSerializationNamespace(ISerializationNamespace serializationNamespace)
        {
            if (serializationNamespace == null)
            {
                throw new ArgumentNullException(nameof(serializationNamespace));
            }

            Name = QualifiedName(
                serializationNamespace.Name,
                IdentifierName("Json"));

            DiscriminatorConverter = QualifiedName(
                Name,
                IdentifierName("DiscriminatorConverter"));

            DynamicAdditionalPropertiesDictionary = QualifiedName(
                Name,
                IdentifierName("DynamicAdditionalPropertiesDictionary"));

            JsonTypeSerializer = QualifiedName(
                Name,
                IdentifierName("JsonTypeSerializer"));

            NullableDynamicAdditionalPropertiesDictionary = QualifiedName(
                Name,
                IdentifierName("NullableDynamicAdditionalPropertiesDictionary"));
        }
예제 #5
0
 public UnknownResponseTypeGenerator(ILocatedOpenApiElement <OpenApiUnknownResponse> responseElement, GenerationContext context,
                                     ISerializationNamespace serializationNamespace,
                                     IResponsesNamespace responsesNamespace)
     : base(responseElement, context)
 {
     SerializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
     ResponsesNamespace     = responsesNamespace ?? throw new ArgumentNullException(nameof(responsesNamespace));
 }
 public UnknownResponseTypeGeneratorFactory(GenerationContext context,
                                            IResponsesNamespace responsesNamespace,
                                            ISerializationNamespace serializationNamespace)
 {
     _context            = context ?? throw new ArgumentNullException(nameof(context));
     _responsesNamespace = responsesNamespace ??
                           throw new ArgumentNullException(nameof(responsesNamespace));
     _serializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
 }
 public TagTypeGeneratorFactory(GenerationContext context, IOperationMethodGenerator operationMethodGenerator,
                                ISerializationNamespace serializationNamespace, IAuthenticationNamespace authenticationNamespace)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
     _operationMethodGenerator = operationMethodGenerator ??
                                 throw new ArgumentNullException(nameof(operationMethodGenerator));
     _serializationNamespace  = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
     _authenticationNamespace = authenticationNamespace ?? throw new ArgumentNullException(nameof(authenticationNamespace));
 }
예제 #8
0
 public TagTypeGenerator(ILocatedOpenApiElement <OpenApiTag> tagElement, GenerationContext context,
                         ISerializationNamespace serializationNamespace, IAuthenticationNamespace authenticationNamespace,
                         IOperationMethodGenerator operationMethodGenerator)
     : base(tagElement, context)
 {
     _serializationNamespace  = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
     _authenticationNamespace = authenticationNamespace ??
                                throw new ArgumentNullException(nameof(authenticationNamespace));
     _operationMethodGenerator = operationMethodGenerator ?? throw new ArgumentNullException(nameof(operationMethodGenerator));
 }
예제 #9
0
 public ResponseTypeGenerator(ILocatedOpenApiElement <OpenApiResponse> responseElement, GenerationContext context,
                              IMediaTypeSelector mediaTypeSelector,
                              IHttpResponseCodeNameProvider httpResponseCodeNameProvider,
                              ISerializationNamespace serializationNamespace,
                              IResponsesNamespace responsesNamespace,
                              IGetBodyMethodGenerator getBodyMethodGenerator)
     : base(responseElement, context)
 {
     MediaTypeSelector            = mediaTypeSelector ?? throw new ArgumentNullException(nameof(mediaTypeSelector));
     HttpResponseCodeNameProvider = httpResponseCodeNameProvider ??
                                    throw new ArgumentNullException(nameof(httpResponseCodeNameProvider));
     SerializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
     ResponsesNamespace     = responsesNamespace ?? throw new ArgumentNullException(nameof(responsesNamespace));
     GetBodyMethodGenerator = getBodyMethodGenerator ?? throw new ArgumentNullException(nameof(getBodyMethodGenerator));
 }
예제 #10
0
 public ResponseTypeGenerator(ILocatedOpenApiElement <OpenApiResponse> responseElement, GenerationContext context,
                              IMediaTypeSelector mediaTypeSelector,
                              IHttpResponseCodeNameProvider httpResponseCodeNameProvider,
                              ISerializationNamespace serializationNamespace,
                              IResponsesNamespace responsesNamespace,
                              IEnumerable <IResponseMethodGenerator> methodGenerators)
     : base(responseElement, context, null)
 {
     MediaTypeSelector            = mediaTypeSelector ?? throw new ArgumentNullException(nameof(mediaTypeSelector));
     HttpResponseCodeNameProvider = httpResponseCodeNameProvider ??
                                    throw new ArgumentNullException(nameof(httpResponseCodeNameProvider));
     SerializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
     ResponsesNamespace     = responsesNamespace ?? throw new ArgumentNullException(nameof(responsesNamespace));
     MethodGenerators       = (methodGenerators ?? throw new ArgumentNullException(nameof(methodGenerators))).ToArray();
 }
 public ResponseTypeGeneratorFactory(GenerationContext context, IMediaTypeSelector mediaTypeSelector,
                                     IHttpResponseCodeNameProvider httpResponseCodeNameProvider,
                                     IResponsesNamespace responsesNamespace, IGetBodyMethodGenerator parseBodyMethodGenerator,
                                     ISerializationNamespace serializationNamespace)
 {
     _context                      = context ?? throw new ArgumentNullException(nameof(context));
     _mediaTypeSelector            = mediaTypeSelector ?? throw new ArgumentNullException(nameof(mediaTypeSelector));
     _httpResponseCodeNameProvider = httpResponseCodeNameProvider ??
                                     throw new ArgumentNullException(nameof(httpResponseCodeNameProvider));
     _responsesNamespace = responsesNamespace ??
                           throw new ArgumentNullException(nameof(responsesNamespace));
     _parseBodyMethodGenerator = parseBodyMethodGenerator ??
                                 throw new ArgumentNullException(nameof(parseBodyMethodGenerator));
     _serializationNamespace = serializationNamespace ??
                               throw new ArgumentNullException(nameof(serializationNamespace));
 }
예제 #12
0
        public JsonSerializationNamespace(ISerializationNamespace serializationNamespace)
        {
            if (serializationNamespace == null)
            {
                throw new ArgumentNullException(nameof(serializationNamespace));
            }

            Name = QualifiedName(
                serializationNamespace.Name,
                IdentifierName("Json"));

            DiscriminatorConverter = QualifiedName(
                Name,
                IdentifierName("DiscriminatorConverter"));

            JsonTypeSerializer = QualifiedName(
                Name,
                IdentifierName("JsonTypeSerializer"));
        }
예제 #13
0
        public JsonSerializationNamespace(ISerializationNamespace serializationNamespace)
        {
            if (serializationNamespace == null)
            {
                throw new ArgumentNullException(nameof(serializationNamespace));
            }

            Name = QualifiedName(
                serializationNamespace.Name,
                IdentifierName("Json"));

            JsonTypeSerializer = QualifiedName(
                Name,
                IdentifierName("JsonTypeSerializer"));

            JsonHelpers = QualifiedName(
                Name,
                IdentifierName("JsonHelpers"));
        }
예제 #14
0
 public RequestMultipartEncodingEnricher(ISerializationNamespace serializationNamespace)
 {
     _serializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
 }
 public BuildUriMethodGenerator(GenerationContext context, ISerializationNamespace serializationNamespace)
 {
     Context = context ?? throw new ArgumentNullException(nameof(context));
     SerializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
 }
예제 #16
0
 public BuildRequestMethodGenerator(ISerializationNamespace serializationNamespace)
 {
     SerializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
 }
예제 #17
0
 public MultipartPropertyEnricher(ISerializationNamespace serializationNamespace)
 {
     _serializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
 }
예제 #18
0
 public HeaderParsingEnricher(GenerationContext context, ISerializationNamespace serializationNamespace)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
     _serializationNamespace = serializationNamespace ?? throw new ArgumentNullException(nameof(serializationNamespace));
 }