ApiDescriptionExtensions Class

Summary

Extension methods for [Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription](Microsoft.AspNet.Mvc.ApiExplorer.ApiDescription.yml).

Syntax

public class ApiDescriptionExtensions

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.ApiExplorer.ApiDescriptionExtensions

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:
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:
public static void SetProperty<T>(ApiDescription apiDescription, T value)