C# Class FailureTroubleshooting.Areas.HelpPage.ModelDescriptions.ModelDescriptionGenerator

Generates model descriptions for given types.
Show file Open project: Zjazure/FailureTroubleshooting Class Usage Examples

Private Properties

Property Type Description
CreateDefaultDocumentation string
GenerateAnnotations void
GenerateCollectionModelDescription CollectionModelDescription
GenerateComplexTypeModelDescription ModelDescription
GenerateDictionaryModelDescription DictionaryModelDescription
GenerateEnumTypeModelDescription EnumTypeModelDescription
GenerateKeyValuePairModelDescription KeyValuePairModelDescription
GenerateSimpleTypeModelDescription ModelDescription
GetMemberName string
ShouldDisplayMember bool

Public Methods

Method Description
GetOrCreateModelDescription ( Type modelType ) : ModelDescription
ModelDescriptionGenerator ( System.Web.Http.HttpConfiguration config ) : Newtonsoft.Json

Private Methods

Method Description
CreateDefaultDocumentation ( Type type ) : string
GenerateAnnotations ( MemberInfo property, ParameterDescription propertyModel ) : void
GenerateCollectionModelDescription ( Type modelType, Type elementType ) : CollectionModelDescription
GenerateComplexTypeModelDescription ( Type modelType ) : ModelDescription
GenerateDictionaryModelDescription ( Type modelType, Type keyType, Type valueType ) : DictionaryModelDescription
GenerateEnumTypeModelDescription ( Type modelType ) : EnumTypeModelDescription
GenerateKeyValuePairModelDescription ( Type modelType, Type keyType, Type valueType ) : KeyValuePairModelDescription
GenerateSimpleTypeModelDescription ( Type modelType ) : ModelDescription
GetMemberName ( MemberInfo member, bool hasDataContractAttribute ) : string
ShouldDisplayMember ( MemberInfo member, bool hasDataContractAttribute ) : bool

Method Details

GetOrCreateModelDescription() public method

public GetOrCreateModelDescription ( Type modelType ) : ModelDescription
modelType System.Type
return ModelDescription

ModelDescriptionGenerator() public method

public ModelDescriptionGenerator ( System.Web.Http.HttpConfiguration config ) : Newtonsoft.Json
config System.Web.Http.HttpConfiguration
return Newtonsoft.Json