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.]+)/
NON_ACTION_SIGNATURE_RE = /\b(?:IHttpActionResult|HttpResponseMessage)\b/
VERB_ATTRIBUTES = {"HttpGet" => "GET", "HttpPost" => "POST", "HttpPut" => "PUT", "HttpDelete" => "DELETE", "HttpPatch" => "PATCH"}
Class methods
tech_name
SourceInstance methods
analyze
Sourcetech
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.