OpenApiDocDescriptor.TryGetComponent<T> method

Tries to retrieve an OpenAPI component by name and kind.

public bool TryGetComponent<T>(string name, OpenApiComponentKind kind, out T? value)
    where T : class
parameter description
T The expected OpenAPI component type.
name The component name.
kind The OpenAPI component kind.
value When this method returns true, contains the component.

Return Value

true if the component exists; otherwise, false.

See Also