C#

C# Frameworks and Libraries supported by NightVision API Discovery

The following section covers the components of different C# frameworks and their library components that NightVision’s API Discovery capability can detect and use to generate OpenAPI documentation. If a component that you use is not supported, please contact our support team at [email protected] and we can add this as a new feature.

C# ASP.NET.CORE

Microsoft.AspNetCore.Builder

Library ComponentDescription
WebApplicationMethod to initialize a web application
WebApplication.CreateBuilderMethod to create a builder for a web application, configuring services and middleware
WebApplicationBuilderInitializes a new instance of the web application builder
WebApplicationBuilder.BuildBuilds the web application and sets up the hosting environment
WebApplicationBuilder.ServicesCollection of services for the application to compose
IApplicationBuilder.MapApplies a base path prefix to a branch of the application
IApplicationBuilder.UseEndpointsAdds middleware that will execute the defined endpoints
IApplicationBuilder.UseHealthChecksAdds a middleware that provides health check status
IApplicationBuilder.UseMvcAdds MVC to the request execution pipeline
IApplicationBuilder.UseMvcWithDefaultRouteAdds MVC to the request execution pipeline with a default route
IApplicationBuilder.UsePathBaseApplies a base path prefix to the application
IEndpointConventionBuilderBuilds conventions that will be used for customization of EndpointBuilder instances
IEndpointConventionBuilder.AllowAnonymousAllows anonymous access to endpoints
IEndpointConventionBuilder.RequireAuthorizationAdds authorization to endpoints

Microsoft.AspNetCore.Mvc

Library ComponentDescription
ApiControllerMarks a class as an API controller with attribute routing, making it use attribute routing to define its routes
ControllerBase class for an MVC controller without views
ControllerBaseBase class for an MVC or API controller
FromBodyThe attribute that specifies a parameter should be bound from the body of the request
FromHeaderThe attribute that specifies a parameter should be bound from the request headers
FromQueryThe attribute that specifies a parameter should be bound from the query string
FromRouteThe attribute that specifies a parameter should be bound from route data
HttpContextEncapsulates all HTTP-specific information about an individual HTTP request
HttpDeleteAttribute indicating an action responds to HTTP DELETE requests
HttpGetAttribute indicating an action responds to HTTP GET requests
HttpHeadAttribute indicating an action responds to HTTP HEAD requests
HttpOptionsAttribute indicating an action responds to HTTP OPTIONS requests
HttpPatchAttribute indicating an action responds to HTTP PATCH requests
HttpPostAttribute indicating an action responds to HTTP POST requests
HttpPutAttribute indicating an action responds to HTTP PUT requests
RouteAttribute that defines the URL pattern that an action handles

Microsoft.AspNetCore.Routing

Library ComponentDescription
IEndpointRouteBuilder MapDelete, MapGet, MapHead, MapOptions, MapPatch, MapPost, MapPutContract for specifying the routes for an application
IEndpointRouteBuilder.MapControllersAdds endpoints for controller actions
IEndpointRouteBuilder.MapDefaultControllerRouteAdds endpoints for controller actions to the IEndpointRouteBuilder and adds the default route {controller=Home}/{action=Index}/{id?}
IEndpointRouteBuilder.MapGroupCreates a RouteGroupBuilder for defining endpoints prefixed with a specified prefix
IRouteBuilder MapDelete, MapGet, MapHead, MapOptions, MapPatch, MapPost, MapPutContract for a route builder in an application
RouteGroupBuilderA builder for defining groups of endpoints with a common prefix

Microsoft.AspNetCore.Http

Library ComponentDescription
HttpContextEncapsulates all HTTP-specific information about an individual request
HttpContext.AuthenticateAsyncAuthenticate the current request
HttpContext.RequestGets the HttpRequest object for the request
HttpRequestRepresents the incoming side of an individual HTTP request
HttpRequest.CookiesGets the collection of Cookies for this request
HttpRequest.FormAccess the request body as form values
HttpRequest.HeadersGets the request headers
HttpRequest.QueryGets the query value collection for the request
HttpResultsNamespace containing classes implementing IResult
IResultThe result of an HTTP endpoint
PathStringProvides correct escaping for path when constructing a URI string

Microsoft.Extensions.DependencyInjection

Library ComponentDescription
IServiceCollectionSpecifies the contract for a collection of service descriptors
IServiceCollection.AddAuthenticationRegisters services required by authentication
IServiceCollection.AddAuthorizationRegisters services required by authorization
IServiceCollection.AddAuthorizationBuilderAdd a builder to add authorization services
IServiceCollection.AddDefaultIdentityAdds a set of common identity services to the application and configures authentication to use identity cookies
IServiceCollection.AddIdentityAdds the default identity system configuration for a specified user and role types
IServiceCollection.AddIdentityServerReturn a builder object that provides extension methods to add IdentityServer-specific services to the service provider
IServiceCollection.AddOpenIddictRegisters OpenIddict core services to allow an application to act as an OIDC and OAuth2 provider
IServiceCollection.ConfigureApplicationCookieConfigures the application cookie

Microsoft.AspNetCore.Authentication

Library ComponentDescription
AuthenticationBuilderAuthentication builder class
AuthenticationBuilder.AddSchemeAdd and configures a custom authentication scheme
AuthenticationBuilder.AddCookieAdds cookie authentication to the AuthenticationBuilder
AuthenticationBuilder.AddJwtBearerEnables JWT-bearer authentication
AuthenticationBuilder.AddNegotiateConfigures the AuthenticationBuilder to use Negotiate (a.k.a. Windows, Kerberos, or NTLM) authentication
AuthenticationBuilder.AddOAuthAdds OAuth2-based authentication
AuthenticationBuilder.AddOpenIdConnectAdds OpenIdConnect authentication
AuthenticationBuilder.AddWsFederationRegisters the WS-Federation authentication handler
AuthenticationBuilder.AddFacebookAdd Facebook OAuth2-based authentication
AuthenticationBuilder.AddGoogleAdd Google OAuth2-based authentication
AuthenticationBuilder.AddMicrosoftAccountAdd Microsoft OAuth2-based authentication
AuthenticationBuilder.AddMicrosoftIdentityWebApiProtects the web API with Microsoft identity platform (formerly Azure AD v2.0)
AuthenticationBuilder.AddMicrosoftIdentityWebAppAdd authentication with Microsoft identity platform
AuthenticationBuilder.AddPolicySchemeRegisters an authentication handler which can redirect to other authentication schemes
AuthenticationOptionsOptions to configure authentication for an application
AuthenticationOptions.DefaultAuthenticateSchemeUsed as the default scheme by authenticate operations
AuthenticationOptions.DefaultSchemeUsed as the fallback default scheme for all authentication operations
AuthenticationSchemeOptionsBase class to configure an authentication scheme
AuthenticationSchemeOptions.ForwardAuthenticateSpecifies the target scheme that this scheme should forward authenticate operations to
AuthenticationSchemeOptions.ForwardDefaultSpecifies a default scheme that authentication handlers forward all authentication operations to
AuthenticationSchemeOptions.ForwardDefaultSelectorFunction that selects a default scheme for the current request that authentication handlers should forward all authentication operations to
AuthenticateResultContains the result of an Authenticate call
PolicySchemeOptionsOptions used by a policy scheme handler
JwtBearerNamespace that contains types that enable support for JWT bearer based authentication
CookiesContains types that support cookie based authentication
OAuthContains types that enable support for OAuth based authentication
OpenIdConnectContains types that enable support for OpenIdConnect based authentication
NegotiateContains types that enable support for Negotiate (also known as Windows, Kerberos, or NTLM) based authentication

Microsoft.AspNetCore.Authorization

Library ComponentDescription
AllowAnonymousAttributeSpecifies that the class or method that this attribute is applied to does not require authorization
AuthorizationBuilderUsed configure authorization
AuthorizationBuilder.AddPolicyAdds a policy which can be used by an authorization service
AuthorizationOptionsOptions to configure authorization for an application
AuthorizationOptions.AddPolicyAdd an authorization policy
AuthorizationPolicyCollection of authorization requirements and the scheme or schemes they are evaluated against, all of which must succeed for authorization to succeed
AuthorizationPolicy.AuthenticationSchemesList of the authentication schemes the policy requirements are evaluated against
AuthorizationPolicyBuilderUsed for building policies
AuthorizationPolicyBuilder.AddAuthenticationSchemesAdds the specified authentication schemes to the builder
AuthorizationPolicyBuilder.BuildBuilds a new authorization policy from the requirements in this instance
AuthorizeAttributeSpecifies that the class or method that this attribute is applied to requires the specified authorization
IAuthorizeDataInterface defining the data required to apply authorization rules to a resource
IAuthorizeData.AuthenticationSchemesComma-delimited list of schemes from which user information is constructed
IAuthorizeData.PolicyPolicy name that determines access to the resource

Microsoft.AspNetCore.Identity

Library ComponentDescription
IdentityBuilderHelper functions for configuring identity services
IdentityConstantsValues used used to configure the identity system's cookies middleware