class

Detector::VB::AspNetMvc

Inherits Detector < Reference < Object

Constants

CONTROLLER_RE = /\bClass\s+\w+Controller\b[\s:]*Inherits\s+[\w.]*Controller(?:Base)?\b/i

VB projects import System.Web.Mvc / System.Web.Http project-wide from the .vbproj, so a controller file rarely names the namespace; the *Controller class with a controller base is the signal.

ROUTE_TABLE_RE = /\.Map(?:Http|Controller)?Route\s*\(/i

Instance methods

applicable?(filename : String) : Bool

Cheap filename-only filter the detector pass uses to skip detect on files the detector cannot possibly match. The default true preserves prior behavior (every detector runs on every file). Override with the same predicate the body of detect starts with — e.g., filename.ends_with?(".py") for a Python framework detector — so the detector loop avoids the detect dispatch on files outside the detector's language.

On large codebases (saleor's 4255 .py files) this lifts ~100 virtual detect calls per file out of the hot loop because most detectors' inner first-line is exactly this kind of cheap filename check.

Source
detect(filename : String, file_contents : String) : Bool
Source
name

The tech name; detector_for overrides it. Empty on the bare base.

Source