public override void WriteStart(DataServiceODataWriterNavigationLinkArgs args) { var current = new CustomInstanceAnnotationsDescriptor { TypeOfAnnotatedItem = typeof(ODataNavigationLink) }; writtenItemsStack.Push(current); base.WriteStart(args); }
/// <summary> /// Start writing a navigation link. /// </summary> /// <param name="args">DataServiceODataWriterNavigationLinkArgs which contains the ODataNavigationLink to serialize.</param> public virtual void WriteStart(DataServiceODataWriterNavigationLinkArgs args) { WebUtil.CheckArgumentNull(args, "args"); this.innerWriter.WriteStart(args.NavigationLink); }
/// <summary> /// Finish writing a navigation link. /// </summary> /// <param name="args">DataServiceODataWriterNavigationLinkArgs which contains the ODataNavigationLink that is being serialized.</param> /// <remarks> /// This method calls WriteEnd() and it's used to track when WriteEnd is called for Link. /// </remarks> public virtual void WriteEnd(DataServiceODataWriterNavigationLinkArgs args) { WebUtil.CheckArgumentNull(args, "args"); this.WriteEnd(); }
public override void WriteEnd(DataServiceODataWriterNavigationLinkArgs args) { if (WriteLinkEnd.Value != null) { if (WriteLinkEnd.Value(args)) return; } base.WriteEnd(args); }