ApiDescriptionExtensions Class¶
Extension methods for Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription
.
- Namespace
Microsoft.AspNetCore.Mvc.ApiExplorer
- Assemblies
- Microsoft.AspNetCore.Mvc.ApiExplorer
Syntax¶
public class ApiDescriptionExtensions
-
class
Microsoft.AspNetCore.Mvc.ApiExplorer.
ApiDescriptionExtensions
Methods¶
-
GetProperty<T>
(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription)¶ Gets the value of a property from the
Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription.Properties
collection using the provided value of <em>T</em> as the key.Arguments: apiDescription (Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription) – The Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription
.Return type: T Returns: The property or the default value of <em>T</em>. public static T GetProperty<T>(this ApiDescription apiDescription)
-
SetProperty<T>
(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription, T)¶ Sets the value of an property in the
Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription.Properties
collection using the provided value of <em>T</em> as the key.Arguments: - apiDescription (Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription) – The
Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription
. - value (T) – The value of the property.
public static void SetProperty<T>(this ApiDescription apiDescription, T value)
- apiDescription (Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription) – The
-