Example #1
0
        public void GetClrTypeForUntypedDelta_ThrowsInvalidOperation_ForUnsupportedTypeKind()
        {
            // Arrange & Act
            IEdmPathTypeReference path = EdmCoreModel.Instance.GetPathType(EdmPathTypeKind.PropertyPath, true);
            Action test = () => EdmStructuredObject.GetClrTypeForUntypedDelta(path);

            // Assert
            ExceptionAssert.Throws <InvalidOperationException>(
                () => EdmStructuredObject.GetClrTypeForUntypedDelta(path),
                "The EDM type '[Edm.PropertyPath Nullable=True]' of kind 'Path' is not supported.");
        }
Example #2
0
        private void VisitPathType(IEdmPathTypeReference pathReference)
        {
            string qualifiedName = pathReference.FullName();

            if (_types.ContainsKey(qualifiedName))
            {
                return;
            }

            IEdmPathType primitiveType = (IEdmPathType)(pathReference.Definition);

            MetaPrimitiveType metaPrimitiveType = new MetaPrimitiveType();

            metaPrimitiveType.QualifiedName = qualifiedName;
            metaPrimitiveType.Name          = primitiveType.Name;
            _types[qualifiedName]           = metaPrimitiveType;
        }
Example #3
0
 protected virtual void ProcessPathTypeReference(IEdmPathTypeReference reference)
 {
     this.ProcessTypeReference(reference);
 }