C# Class NServiceMVC.Metadata.MetadataReflector

Finds metadata related to the models and routes currently configured.
ファイルを表示 Open project: gregmac/NServiceMVC Class Usage Examples

Public Methods

Method Description
FindModelDetail ( string typeName ) : ModelDetail

Finds model details for a given type by its string name

MetadataReflector ( NServiceMVC config, System.Formats formatter ) : System

Creates a new instance of the reflector

Private Methods

Method Description
CreateModelDetail ( System type ) : ModelDetail

Creates a new modelDetail object, and checks MetadataReflector.GetModelTypes() to see if we have metadata

CreateModelDetail ( System type, bool hasMetadata, string defaultDescription = null ) : ModelDetail

Creates a new modelDetail object

FindBasicModelTypes ( ) : ModelDetailCollection

Finds built-in System.* types, repesentign them as models

FindModelTypes ( ) : ModelDetailCollection

Gets known model data types (cached).

FindRouteDetails ( ) : IEnumerable
GetCSharpCode ( Type t ) : string
GetHttpMethod ( string methods ) : string

Extracts the HTTP method for the route attribute

GetModelDetailArray ( Type type ) : ModelDetail

Create ModelDetail of an array of the passed type

IsArrayOrEnumerableSingle ( Type type ) : bool

Checks if the type is an array or Enumerable (single-element arrays/lists only: not dictionaries/hashes)

Method Details

FindModelDetail() public method

Finds model details for a given type by its string name
public FindModelDetail ( string typeName ) : ModelDetail
typeName string
return ModelDetail

MetadataReflector() public method

Creates a new instance of the reflector
public MetadataReflector ( NServiceMVC config, System.Formats formatter ) : System
config NServiceMVC The current NServiceMVC configuration
formatter System.Formats The current NServiceMVC FormatManager
return System