OpenApiWriterExtensions.WriteProperty Method

Definition

Overloads

WriteProperty(IOpenApiWriter, String, String)

Write a string property.

WriteProperty(IOpenApiWriter, String, Boolean, Boolean)

Write a boolean property.

WriteProperty(IOpenApiWriter, String, Nullable<Boolean>, Boolean)

Write a boolean property.

WriteProperty<T>(IOpenApiWriter, String, Nullable<T>)

Write a primitive property.

WriteProperty<T>(IOpenApiWriter, String, T)

Write a string/number property.

WriteProperty(IOpenApiWriter, String, String)

Write a string property.

public static void WriteProperty (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, string value);
static member WriteProperty : Microsoft.OpenApi.Writers.IOpenApiWriter * string * string -> unit
<Extension()>
Public Sub WriteProperty (writer As IOpenApiWriter, name As String, value As String)

Parameters

writer
IOpenApiWriter

The writer.

name
String

The property name.

value
String

The property value.

Applies to

WriteProperty(IOpenApiWriter, String, Boolean, Boolean)

Write a boolean property.

public static void WriteProperty (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, bool value, bool defaultValue = false);
static member WriteProperty : Microsoft.OpenApi.Writers.IOpenApiWriter * string * bool * bool -> unit
<Extension()>
Public Sub WriteProperty (writer As IOpenApiWriter, name As String, value As Boolean, Optional defaultValue As Boolean = false)

Parameters

writer
IOpenApiWriter

The writer.

name
String

The property name.

value
Boolean

The property value.

defaultValue
Boolean

The default boolean value.

Applies to

WriteProperty(IOpenApiWriter, String, Nullable<Boolean>, Boolean)

Write a boolean property.

public static void WriteProperty (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, bool? value, bool defaultValue = false);
static member WriteProperty : Microsoft.OpenApi.Writers.IOpenApiWriter * string * Nullable<bool> * bool -> unit
<Extension()>
Public Sub WriteProperty (writer As IOpenApiWriter, name As String, value As Nullable(Of Boolean), Optional defaultValue As Boolean = false)

Parameters

writer
IOpenApiWriter

The writer.

name
String

The property name.

value
Nullable<Boolean>

The property value.

defaultValue
Boolean

The default boolean value.

Applies to

WriteProperty<T>(IOpenApiWriter, String, Nullable<T>)

Write a primitive property.

public static void WriteProperty<T> (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, T? value) where T : struct;
static member WriteProperty : Microsoft.OpenApi.Writers.IOpenApiWriter * string * Nullable<'T (requires 'T : struct)> -> unit (requires 'T : struct)
<Extension()>
Public Sub WriteProperty(Of T As Structure) (writer As IOpenApiWriter, name As String, value As Nullable(Of T))

Type Parameters

T

Parameters

writer
IOpenApiWriter

The writer.

name
String

The property name.

value
Nullable<T>

The property value.

Applies to

WriteProperty<T>(IOpenApiWriter, String, T)

Write a string/number property.

public static void WriteProperty<T> (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, T value) where T : struct;
static member WriteProperty : Microsoft.OpenApi.Writers.IOpenApiWriter * string * 'T -> unit (requires 'T : struct)
<Extension()>
Public Sub WriteProperty(Of T As Structure) (writer As IOpenApiWriter, name As String, value As T)

Type Parameters

T

Parameters

writer
IOpenApiWriter

The writer.

name
String

The property name.

value
T

The property value.

Applies to