usingSystem.Collections.Generic;usingSystem.Collections.ObjectModel;usingSystem.Net.Http.Headers;usingSystem.Web.Http.Description;usingHousingWebApi.Areas.HelpPage.ModelDescriptions;namespaceHousingWebApi.Areas.HelpPage.Models{/// <summary>/// The model that represents an API displayed on the help page./// </summary>publicclassHelpPageApiModel{/// <summary>/// Initializes a new instance of the <see cref="HelpPageApiModel"/> class./// </summary>publicHelpPageApiModel(){UriParameters=newCollection<ParameterDescription>();SampleRequests=newDictionary<MediaTypeHeaderValue,object>();SampleResponses=newDictionary<MediaTypeHeaderValue,object>();ErrorMessages=newCollection<string>();}/// <summary>/// Gets or sets the <see cref="ApiDescription"/> that describes the API./// </summary>publicApiDescriptionApiDescription{get;set;}/// <summary>/// Gets or sets the <see cref="ParameterDescription"/> collection that describes the URI parameters for the API./// </summary>publicCollection<ParameterDescription>UriParameters{get;privateset;}/// <summary>/// Gets or sets the documentation for the request./// </summary>publicstringRequestDocumentation{get;set;}/// <summary>/// Gets or sets the <see cref="ModelDescription"/> that describes the request body./// </summary>publicModelDescriptionRequestModelDescription{get;set;}/// <summary>/// Gets the request body parameter descriptions./// </summary>publicIList<ParameterDescription>RequestBodyParameters{get{returnGetParameterDescriptions(RequestModelDescription);}}/// <summary>/// Gets or sets the <see cref="ModelDescription"/> that describes the resource./// </summary>publicModelDescriptionResourceDescription{get;set;}/// <summary>/// Gets the resource property descriptions./// </summary>publicIList<ParameterDescription>ResourceProperties{get{returnGetParameterDescriptions(ResourceDescription);}}/// <summary>/// Gets the sample requests associated with the API./// </summary>publicIDictionary<MediaTypeHeaderValue,object>SampleRequests{get;privateset;}/// <summary>/// Gets the sample responses associated with the API./// </summary>publicIDictionary<MediaTypeHeaderValue,object>SampleResponses{get;privateset;}/// <summary>/// Gets the error messages associated with this model./// </summary>publicCollection<string>ErrorMessages{get;privateset;}privatestaticIList<ParameterDescription>GetParameterDescriptions(ModelDescriptionmodelDescription){ComplexTypeModelDescriptioncomplexTypeModelDescription=modelDescriptionasComplexTypeModelDescription;if(complexTypeModelDescription!=null){returncomplexTypeModelDescription.Properties;}CollectionModelDescriptioncollectionModelDescription=modelDescriptionasCollectionModelDescription;if(collectionModelDescription!=null){complexTypeModelDescription=collectionModelDescription.ElementDescriptionasComplexTypeModelDescription;if(complexTypeModelDescription!=null){returncomplexTypeModelDescription.Properties;}}returnnull;}}}