Beispiel #1
0
 /// <summary>
 /// Creates a new instance of the corresponding IEdmPrimitiveType
 /// </summary>
 /// <returns>Returns a new instance of the corresponding IEdmPrimitiveType</returns>
 internal IEdmPrimitiveType CreateEdmPrimitiveType()
 {
     // Note we always create a new instance of an IEdmPrimitiveType instead of returning the static instance by calling
     // EdmCoreModel.Default.GetPrimitiveType(), for the following reasons:
     // 1. We will annotate the IEdmPrimitiveType with a ClientTypeAnnotation, which has a MaxProtocolVersion property. We can't map
     //    an instance of IEdmPrimitiveType to a CLR type, instead it is mapped to the (CLR type, MaxProtocolVersion) pair.
     // 2. We do have multiple CLR primitive types mapped to a single EDM primitive type (take Edm.String for example). In this case
     //    we need to create multiple instances of the Edm.String type and annotate them with the corresponding CLR type.
     return(ClientEdmPrimitiveType.CreateType(this.PrimitiveKind));
 }
Beispiel #2
0
 internal IEdmPrimitiveType CreateEdmPrimitiveType()
 {
     return(ClientEdmPrimitiveType.CreateType(this.primitiveKind));
 }