class

Analyzer::CSharp::AspNetMvc

Inherits Analyzer::CSharp::Common < Analyzer < FileHelper < Reference < Object

Constants

ACTION_RESULT_RE = /Result\s*>?\s+\w+\s*\(/

The return type ends in Result right before the action name: ActionResult, JsonResult, FileResult, Task<ViewResult>, ...

ASPNET_CORE_MARKER_RE = /\bIActionResult\b|\[\s*ApiController\b/

Types that exist only in ASP.NET Core.

ASPNET_CORE_PROJECT_RE = /Sdk\s*=\s*"Microsoft\.NET\.Sdk\.Web"|FrameworkReference\s+Include\s*=\s*"Microsoft\.AspNetCore\.App"/
BINDINGS = {"FromQuery" => "query", "FromRoute" => "path", "FromBody" => "json", "FromHeader" => "header", "FromForm" => "form", "FromCookie" => "cookie"}
LOCAL_CLASS_BASE_RE = /\bclass\s+(\w+)(?:\s*<[^<>]*+>)?\s*:\s*([\w.]+)/
MVC5_REFERENCE_RE = /System\.Web\.Mvc|Microsoft\.AspNet\.Mvc/
NON_ACTION_SIGNATURE_RE = /\b(?:IHttpActionResult|HttpResponseMessage)\b/
VERB_ATTRIBUTES = {"HttpGet" => "GET", "HttpPost" => "POST", "HttpPut" => "PUT", "HttpDelete" => "DELETE", "HttpPatch" => "PATCH"}
WEB_API_NAMESPACE_RE = /\bSystem\.Web\.(?:Http|OData)\b/

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source