/// <summary> /// Adds a content type annotation to the given deferred link /// </summary> /// <param name="link">The deferred link</param> /// <param name="contentTypeValue">The value for the annotation</param> /// <returns>The same deferred link</returns> public static DeferredLink WithContentType(this DeferredLink link, string contentTypeValue) { return(link.AddAnnotation(new ContentTypeAnnotation(contentTypeValue))); }
/// <summary> /// Initializes a new instance of the NavigationPropertyInstance class /// </summary> /// <param name="name">The property name</param> /// <param name="value">The navigation link value</param> /// <param name="associationLink">The ralationship link value</param> public NavigationPropertyInstance(string name, ODataPayloadElement value, DeferredLink associationLink) : this(name, value) { this.AssociationLink = associationLink; }
/// <summary> /// Adds an annotation to the deferred link to tell the xml serializer to use the metadata namespace instead of the data services namespace /// </summary> /// <param name="link">The link to add the annotation to</param> /// <returns>The annotated link</returns> public static DeferredLink UseMetadataNamespace(this DeferredLink link) { return(link.AddAnnotation(new UseMetadataNamespaceAnnotation())); }