Freigeben über


2.1.26 TypeRef

The TypeRef element is used to reference an existing named type.

The following is an example of a TypeRef element with the Name attribute specified.

 <TypeRef Type="Model.Person" />

The following is an example of a TypeRef with facets specified.

 <TypeRef Type="Edm.String" Nullable="true" MaxLength="50"/>

The following rules apply to the TypeRef element:

  • TypeRef MUST have a Type attribute defined. The Type attribute defines the fully qualified name of the referenced type.

  • TypeRef is used to reference an existing named type. Named types include:

  • TypeRef can define facets if the type is a scalar type. The Default facet cannot be applied to a TypeRef.

  • TypeRef can contain any number of AnnotationAttribute attributes. The full names of the AnnotationAttribute attributes cannot collide.

  • TypeRef elements can contain at most one Documentation element.

  • TypeRef elements can contain any number of AnnotationElement elements.

  • AnnotationElement is last in the sequence of child elements of TypeRef.

Graphic representation in table format of the rules that apply to the TypeRef element.

All child elements are to appear in the order indicated.