Table of Contents

Class CachedModelMetadata<TPrototypeCache>

Namespace
System.Web.Http.Metadata.Providers
Assembly
System.Web.Http.dll

No content here will be updated; please do not add material here.

public abstract class CachedModelMetadata<TPrototypeCache> : ModelMetadata

Type Parameters

TPrototypeCache

The type of prototype cache.

Inheritance
CachedModelMetadata<TPrototypeCache>
Derived
Inherited Members

Constructors

CachedModelMetadata(CachedModelMetadata<TPrototypeCache>, Func<object>)

Initializes a new instance of the CachedModelMetadata<TPrototypeCache> class.

protected CachedModelMetadata(CachedModelMetadata<TPrototypeCache> prototype, Func<object> modelAccessor)

Parameters

prototype CachedModelMetadata<TPrototypeCache>

The prototype.

modelAccessor Func<object>

The model accessor.

CachedModelMetadata(DataAnnotationsModelMetadataProvider, Type, Type, string, TPrototypeCache)

Initializes a new instance of the CachedModelMetadata<TPrototypeCache> class.

protected CachedModelMetadata(DataAnnotationsModelMetadataProvider provider, Type containerType, Type modelType, string propertyName, TPrototypeCache prototypeCache)

Parameters

provider DataAnnotationsModelMetadataProvider

The provider.

containerType Type

The type of container.

modelType Type

The type of the model.

propertyName string

The name of the property.

prototypeCache TPrototypeCache

The prototype cache.

Properties

ConvertEmptyStringToNull

Gets or sets a value that indicates whether empty strings that are posted back in forms should be converted to null.

public override sealed bool ConvertEmptyStringToNull { get; set; }

Property Value

bool

true if empty strings that are posted back in forms should be converted to null; otherwise, false. The default value is true.

Description

Gets or sets the description of the model.

public override sealed string Description { get; set; }

Property Value

string

The description of the model.

IsComplexType

Gets a value that indicates whether the model is a complex type.

public override sealed bool IsComplexType { get; }

Property Value

bool

A value that indicates whether the model is considered a complex type by the Web API framework.

IsReadOnly

Gets or sets a value that indicates whether the model is read-only.

public override sealed bool IsReadOnly { get; set; }

Property Value

bool

true if the model is read-only; otherwise, false.

PrototypeCache

Gets or sets a value that indicates whether the prototype cache is updating.

protected TPrototypeCache PrototypeCache { get; set; }

Property Value

TPrototypeCache

true if the prototype cache is updating; otherwise, false.

Methods

ComputeConvertEmptyStringToNull()

Indicates whether empty strings that are posted back in forms should be computed and converted to null.

protected virtual bool ComputeConvertEmptyStringToNull()

Returns

bool

true if empty strings that are posted back in forms should be computed and converted to null; otherwise, false.

ComputeDescription()

Indicates the computation value.

protected virtual string ComputeDescription()

Returns

string

The computation value.

ComputeIsComplexType()

Gets a value that indicates whether the model is a complex type.

protected virtual bool ComputeIsComplexType()

Returns

bool

A value that indicates whether the model is considered a complex type by the Web API framework.

ComputeIsReadOnly()

Gets a value that indicates whether the model to be computed is read-only.

protected virtual bool ComputeIsReadOnly()

Returns

bool

true if the model to be computed is read-only; otherwise, false.