Ejemplo n.º 1
0
        /// <summary>
        /// Validates association link before writing.
        /// </summary>
        /// <param name="associationLink">The association link to validate.</param>
        /// <param name="entryEntityType">The entity type of the entry the association link belongs to.</param>
        protected void ValidateAssociationLink(ODataAssociationLink associationLink, IEdmEntityType entryEntityType)
        {
            Debug.Assert(associationLink != null, "associationLink != null");

            WriterValidationUtils.ValidateAssociationLink(associationLink, this.Version, this.WritingResponse);

            // We don't need the returned IEdmProperty since it was already validated to be a navigation property.
            WriterValidationUtils.ValidateNavigationPropertyDefined(associationLink.Name, entryEntityType);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Validates association link before writing.
        /// </summary>
        /// <param name="associationLink">The association link to validate.</param>
        /// <param name="entryEntityType">The entity type of the entry the association link belongs to.</param>
        protected void ValidateAssociationLink(ODataAssociationLink associationLink, IEdmEntityType entryEntityType)
        {
            Debug.Assert(associationLink != null, "associationLink != null");

            WriterValidationUtils.ValidateAssociationLink(associationLink, this.Version, this.WritingResponse);

            // We don't need the returned IEdmProperty since it was already validated to be a navigation property.
            WriterValidationUtils.ValidateNavigationPropertyDefined(associationLink.Name, entryEntityType, this.outputContext.MessageWriterSettings.UndeclaredPropertyBehaviorKinds);
        }
Ejemplo n.º 3
0
 protected void ValidateAssociationLink(ODataAssociationLink associationLink, IEdmEntityType entryEntityType)
 {
     WriterValidationUtils.ValidateAssociationLink(associationLink, this.Version, this.WritingResponse);
     WriterValidationUtils.ValidateNavigationPropertyDefined(associationLink.Name, entryEntityType);
 }