ApiDescriptionExtensions Class¶
Summary¶
Extension methods for [Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription](Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription.yml).
Methods¶
-
GetProperty<T>
(Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription)¶ Gets the value of a property from the [Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription.Properties](Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription.yml) collection using the provided value of <typeparamref name=”T” /> as the key.
Arguments: - apiDescription (Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription) – The [Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription](Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription.yml).
Return type: T
Returns: The property or the default value of <typeparamref name=”T” />.
public static T GetProperty<T>(ApiDescription apiDescription)
-
SetProperty<T>
(Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription, T)¶ Sets the value of an property in the [Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription.Properties](Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription.yml) collection using the provided value of <typeparamref name=”T” /> as the key.
Arguments: - apiDescription (Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription) – The [Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription](Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription.yml).
- value (T) – The value of the property.
public static void SetProperty<T>(ApiDescription apiDescription, T value)
-