Esempio n. 1
0
 /// <summary>Returns the format used by the message reader for reading the payload.</summary>
 /// <returns>The format used by the messageReader for reading the payload.</returns>
 /// <param name="messageReader">The <see cref="T:Microsoft.OData.ODataMessageReader" /> to get the read format from.</param>
 /// <remarks>This method must only be called once reading has started.
 /// This means that a read method has been called on the <paramref name="messageReader"/> or that a reader (for entries, resource sets, collections, etc.) has been created.
 /// If the method is called prior to that it will throw.</remarks>
 public static ODataFormat GetReadFormat(ODataMessageReader messageReader)
 {
     ExceptionUtils.CheckArgumentNotNull(messageReader, "messageReader");
     return(messageReader.GetFormat());
 }
Esempio n. 2
0
 /// <summary>Returns the format used by the message reader for reading the payload.</summary>
 /// <returns>The format used by the messageReader for reading the payload.</returns>
 /// <param name="messageReader">The <see cref="T:Microsoft.OData.Core.ODataMessageReader" /> to get the read format from.</param>
 /// <remarks>This method must only be called once reading has started.
 /// This means that a read method has been called on the <paramref name="messageReader"/> or that a reader (for entries, feeds, collections, etc.) has been created.
 /// If the method is called prior to that it will throw.</remarks>
 public static ODataFormat GetReadFormat(ODataMessageReader messageReader)
 {
     ExceptionUtils.CheckArgumentNotNull(messageReader, "messageReader");
     return messageReader.GetFormat();
 }