Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new instance of the <see cref="RequestBody"/> class.
 /// </summary>
 /// <param name="description">The brief description of the request body.</param>
 /// <param name="content">The content of the request body.</param>
 /// <param name="options">The request body options.</param>
 public RequestBody(
     string description = default,
     IReadOnlyDictionary <ContentType, MediaType> content = default,
     RequestBodyOptions options = default)
 {
     Description = description;
     Content     = content ?? ReadOnlyDictionary.Empty <ContentType, MediaType>();
     Options     = options;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new instance of the <see cref="RequestBodyBuilder"/> class.
 /// </summary>
 /// <param name="value">The <see cref="RequestBody"/> to copy values from.</param>
 public RequestBodyBuilder(RequestBody value)
 {
     if (value is null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     Description = value.Description;
     Content     = new Dictionary <ContentType, MediaType>(value.Content);
     Options     = value.Options;
 }