OpenApiWriterExtensions.WriteOptionalCollection Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WriteOptionalCollection(IOpenApiWriter, String, IEnumerable<String>, Action<IOpenApiWriter,String>) |
Write the optional of collection string. |
WriteOptionalCollection<T>(IOpenApiWriter, String, IEnumerable<T>, Action<IOpenApiWriter,T>) |
Write the optional Open API object/element collection. |
WriteOptionalCollection(IOpenApiWriter, String, IEnumerable<String>, Action<IOpenApiWriter,String>)
Write the optional of collection string.
public static void WriteOptionalCollection (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, System.Collections.Generic.IEnumerable<string> elements, Action<Microsoft.OpenApi.Writers.IOpenApiWriter,string> action);
static member WriteOptionalCollection : Microsoft.OpenApi.Writers.IOpenApiWriter * string * seq<string> * Action<Microsoft.OpenApi.Writers.IOpenApiWriter, string> -> unit
<Extension()>
Public Sub WriteOptionalCollection (writer As IOpenApiWriter, name As String, elements As IEnumerable(Of String), action As Action(Of IOpenApiWriter, String))
Parameters
- writer
- IOpenApiWriter
The Open API writer.
- name
- String
The property name.
- elements
- IEnumerable<String>
The collection values.
- action
- Action<IOpenApiWriter,String>
The collection string writer action.
Applies to
WriteOptionalCollection<T>(IOpenApiWriter, String, IEnumerable<T>, Action<IOpenApiWriter,T>)
Write the optional Open API object/element collection.
public static void WriteOptionalCollection<T> (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, System.Collections.Generic.IEnumerable<T> elements, Action<Microsoft.OpenApi.Writers.IOpenApiWriter,T> action) where T : Microsoft.OpenApi.Interfaces.IOpenApiElement;
static member WriteOptionalCollection : Microsoft.OpenApi.Writers.IOpenApiWriter * string * seq<'T (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)> * Action<Microsoft.OpenApi.Writers.IOpenApiWriter, 'T (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)> -> unit (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)
<Extension()>
Public Sub WriteOptionalCollection(Of T As IOpenApiElement) (writer As IOpenApiWriter, name As String, elements As IEnumerable(Of T), action As Action(Of IOpenApiWriter, T))
Type Parameters
- T
The Open API element type. IOpenApiElement
Parameters
- writer
- IOpenApiWriter
The Open API writer.
- name
- String
The property name.
- elements
- IEnumerable<T>
The collection values.
- action
- Action<IOpenApiWriter,T>
The collection element writer action.