/// <summary> /// Creates a new instance of the <see cref="OasPropertyEncodingBuilder"/> class. /// </summary> /// <param name="value">The <see cref="OasPropertyEncoding"/> to copy values from.</param> public OasPropertyEncodingBuilder(OasPropertyEncoding value) { if (value is null) { throw new ArgumentNullException(nameof(value)); } ContentType = value.ContentType; Headers = new Dictionary <String, OasReferable <OasParameterBody> >(value.Headers); Style = value.Style; Options = value.Options; }
/// <summary> /// Creates a new instance of the <see cref="OasPropertyEncoding"/> class. /// </summary> /// <param name="contentType">The Content-Type for encoding a specific property.</param> /// <param name="headers">The list of headers.</param> /// <param name="style"></param> /// <param name="options"></param> public OasPropertyEncoding( ContentType contentType = default, IReadOnlyDictionary <string, OasReferable <OasParameterBody> > headers = default, OasParameterStyle style = default, OasPropertyEncodingOptions options = default) { ContentType = contentType; Headers = headers ?? ImmutableDictionary <string, OasReferable <OasParameterBody> > .Empty; Style = style; Options = options; }