{"id":853,"date":"2011-10-14T10:59:00","date_gmt":"2011-10-14T10:59:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/odatateam\/2011\/10\/14\/introducing-the-odata-library\/"},"modified":"2011-10-14T10:59:00","modified_gmt":"2011-10-14T10:59:00","slug":"introducing-the-odata-library","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/odata\/introducing-the-odata-library\/","title":{"rendered":"Introducing the OData Library"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><em>This blog talks about a new feature delivered in the WCF Data Services October CTP that can be downloaded <a href=\"https:\/\/www.microsoft.com\/download\/en\/details.aspx?id=27728\">here<\/a>.<\/em><\/p>\n<p>WCF Data Services&rsquo; latest CTP includes a new stand-alone library for working directly with OData. The library makes public some underpinnings of WCF Data Services (the server and client library), and we made this library stand-alone to allow its use independent from WCF Data Services. The library provides a low-level implementation of some components needed to build an OData producer\/consumer. Specifically, we focused on the core tasks of reading\/writing OData from streams in the library&rsquo;s first version, and in the future we hope to add more fundamental OData functionality (possibly OData Uri reading and writing). However, we haven&rsquo;t made any final plans on what we will add, and we welcome your feedback.<\/p>\n<p>I want to take a minute to explain this library&rsquo;s relation to the existing WCF Data Services products; this library doesn&rsquo;t replace WCF Data Services. If you want a great end-to-end solution for creating and exposing your data via an OData endpoint, then the WCF Data Services server library is (and will continue to be) the way to go. If you want a great OData Feed-consuming client with auxiliary support, like code generation and LINQ translation, then WCF Data Services&rsquo; client library is still your best bet. However, we also recognize that people are exploring creative possibilities with OData, and to help them build their own solutions from scratch we made the components we use as part of the WCF Data Services stack available as a stand-alone library.<\/p>\n<p>We have published the OData library&rsquo;s latest source code for the on codeplex (<a href=\"http:\/\/odata.codeplex.com\">http:\/\/odata.codeplex.com<\/a>) as shared source for developers on .NET and other platforms<\/p>\n<p>The CodePlex source code includes the samples that I have attached to this blog post, and I&rsquo;ll walk through a couple of those samples to illustrate reading and writing OData.<\/p>\n<p><strong>Writing a Single Entity<\/strong><\/p>\n<p>To hide the library&rsquo;s details of stream-reading\/writing the OData Library uses an abstraction called a Message, which consists of stream and header interfaces (IODataRequestMessage, IODataResponseMessage). The example below walks through the basics of single-entry writing using an implementation of the messages that work over HTTPClient (this implementation is available in the samples project).<\/p>\n<p>The library uses a class called the ODataMessageWriter to write the actual body of a single ODataMessage (request or response). The ODataMessageWriter has a bunch of methods on it that can be used for writing small non-streaming payloads, such as single properties or individual complex-type values. For larger payloads (such as entities and collections of entities) the ODataMessageWriter has methods that create streaming writers for each payload type. The example shows how to use the ODataMessageWriter methods to create an ODataEntryWriter that can be used to write a single OData entry.<\/p>\n<p>Finally, the sample goes on to use the ODataEntryWriter to write a single Customer entry along with four primitive properties and two deferred links. The samples project includes a few samples that show how to write an expanded navigation link as well.<\/p>\n<p><strong>Writing Full Sample<\/strong><\/p>\n<div id=\"codeSnippetWrapper\">\n<div style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\" id=\"codeSnippet\">\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum1\"> 1:<\/span> HTTPClientRequestMessage message = <span style=\"color: #0000ff\">new<\/span> HTTPClientRequestMessage(uri);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum2\"> 2:<\/span> message.SetHeader(<span style=\"color: #006080\">\"Accept\"<\/span>, formatKind == ODataFormat.Json ? <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"color: #006080\">\"application\/json\"<\/span> : <span style=\"color: #006080\">\"application\/atom+xml\"<\/span>);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum3\"> 3:<\/span> message.Method = HttpMethod.Post;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum4\"> 4:<\/span> message.SetHeader(<span style=\"color: #006080\">\"MaxDataServiceVersion\"<\/span>, maxVersion.ToHeaderValue());<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum5\"> 5:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum6\"> 6:<\/span> <span style=\"color: #008000\">\/\/ create the writer, indent for readability of the examples.<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum7\"> 7:<\/span> ODataMessageWriterSettings writerSettings = <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"color: #0000ff\">new<\/span> ODataMessageWriterSettings() { <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum8\"> 8:<\/span>     Indent = <span style=\"color: #0000ff\">true<\/span>,             <span style=\"color: #008000\">\/\/pretty printing<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum9\"> 9:<\/span>     CheckCharacters = <span style=\"color: #0000ff\">false<\/span>,   <span style=\"color: #008000\">\/\/sets this flag on the XmlWriter for ATOM<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum10\"> 10:<\/span>     BaseUri = <span style=\"color: #0000ff\">new<\/span> Uri(baseUri),<span style=\"color: #008000\">\/\/set the base uri to use in relative links<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum11\"> 11:<\/span>     Version = version <span style=\"color: #008000\">\/\/set the Odata version to use when writing the entry<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum12\"> 12:<\/span> };<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum13\"> 13:<\/span> writerSettings.SetContentType(formatKind);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum14\"> 14:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum15\"> 15:<\/span> <span style=\"color: #008000\">\/\/create message writing for the message<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum16\"> 16:<\/span> <span style=\"color: #0000ff\">using<\/span> (ODataMessageWriter messageWriter = <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"color: #0000ff\">new<\/span> ODataMessageWriter(message, writerSettings))<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum17\"> 17:<\/span> {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum18\"> 18:<\/span>     <span style=\"color: #008000\">\/\/creates a streaming writer for a single entity<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum19\"> 19:<\/span>     ODataWriter writer = messageWriter.CreateODataEntryWriter(); <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum20\"> 20:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum21\"> 21:<\/span>     <span style=\"color: #008000\">\/\/ start the entry<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum22\"> 22:<\/span>     writer.WriteStart(<span style=\"color: #0000ff\">new<\/span> ODataEntry()<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum23\"> 23:<\/span>     {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum24\"> 24:<\/span>         <span style=\"color: #008000\">\/\/ the edit link is relative to the <br \/> \/\/baseUri set on the writer in the case<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum25\"> 25:<\/span>         EditLink = <span style=\"color: #0000ff\">new<\/span> Uri(<span style=\"color: #006080\">\"\/Customers('\"<\/span> + <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataSource.Customers.First().CustomerID +<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"color: #006080\">\"')\"<\/span>, UriKind.Relative),<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum26\"> 26:<\/span>       Id = <span style=\"color: #006080\">\"Customers('\"<\/span> + dataSource.Customers.First().CustomerID + <span style=\"color: #006080\">\"')\"<\/span>,<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum27\"> 27:<\/span>         TypeName = <span style=\"color: #006080\">\"NORTHWNDModel.Customer\"<\/span>,<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum28\"> 28:<\/span>         Properties = <span style=\"color: #0000ff\">new<\/span> List&lt;ODataProperty&gt;(){<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum29\"> 29:<\/span>             <span style=\"color: #0000ff\">new<\/span> ODataProperty(){ Name = <span style=\"color: #006080\">\"CustomerID\"<\/span>, Value = <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataSource.Customers.First().CustomerID },<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum30\"> 30:<\/span>             <span style=\"color: #0000ff\">new<\/span> ODataProperty(){ Name = <span style=\"color: #006080\">\"CompanyName\"<\/span>, Value = <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataSource.Customers.First().CompanyName },<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum31\"> 31:<\/span>             <span style=\"color: #0000ff\">new<\/span> ODataProperty(){ Name = <span style=\"color: #006080\">\"ContactName\"<\/span>, Value = <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataSource.Customers.First().ContactName },<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum32\"> 32:<\/span>             <span style=\"color: #0000ff\">new<\/span> ODataProperty(){ Name = <span style=\"color: #006080\">\"ContactTitle\"<\/span>, Value = <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataSource.Customers.First().ContactTitle }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum33\"> 33:<\/span>         }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum34\"> 34:<\/span>     });<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum35\"> 35:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum36\"> 36:<\/span>     <span style=\"color: #008000\">\/\/create a non-expanded link for the orders navigation property<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum37\"> 37:<\/span>     writer.WriteStart(<span style=\"color: #0000ff\">new<\/span> ODataNavigationLink()<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum38\"> 38:<\/span>     {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum39\"> 39:<\/span>         IsCollection = <span style=\"color: #0000ff\">true<\/span>,<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum40\"> 40:<\/span>         Name = <span style=\"color: #006080\">\"Orders\"<\/span>,<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum41\"> 41:<\/span>         Url = <span style=\"color: #0000ff\">new<\/span> Uri(<span style=\"color: #006080\">\"http:\/\/microsoft.com\/Customer(\"<\/span> + <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataSource.Customers.First().CustomerID + <span style=\"color: #006080\">\")\/Orders\"<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum42\"> 42:<\/span>     });<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum43\"> 43:<\/span>     writer.WriteEnd(); <span style=\"color: #008000\">\/\/ends the orders link<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum44\"> 44:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum45\"> 45:<\/span>     <span style=\"color: #008000\">\/\/create a non-expanded link for the employees navigation property<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum46\"> 46:<\/span>     writer.WriteStart(<span style=\"color: #0000ff\">new<\/span> ODataNavigationLink()<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum47\"> 47:<\/span>     {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum48\"> 48:<\/span>         IsCollection = <span style=\"color: #0000ff\">true<\/span>,<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum49\"> 49:<\/span>         Name = <span style=\"color: #006080\">\"Employees\"<\/span>,<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum50\"> 50:<\/span>         Url = <span style=\"color: #0000ff\">new<\/span> Uri(<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum51\"> 51:<\/span>             <span style=\"color: #006080\">\"http:\/\/microsoft.com\/Customer(\"<\/span> + <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataSource.Customers.First().CustomerID + <span style=\"color: #006080\">\")\/Employees\"<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum52\"> 52:<\/span>     });<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum53\"> 53:<\/span>     writer.WriteEnd(); <span style=\"color: #008000\">\/\/ends the Employees link<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum54\"> 54:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum55\"> 55:<\/span>     writer.WriteEnd(); <span style=\"color: #008000\">\/\/tells the writer we are done writing the entity<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum56\"> 56:<\/span>     writer.Flush(); <span style=\"color: #008000\">\/\/always flush at the end<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum57\"> 57:<\/span> }<\/pre>\n<p><!--CRLF--><\/div>\n<\/div>\n<p><strong>Reading a Single Entity<\/strong><\/p>\n<p>Let&rsquo;s look at an example that shows OData deserialization via the library. The example method below demonstrates how to issue a request to the Netflix OData feed for the set of Genres and parse the response.<\/p>\n<p>The example below makes use of the same ODataMessage classes as the previous example (the HTTPClientMessage), but first creates an HTTPClientRequestMessage that targets the Genres URL for the OData Netflix feeds, and then executes the request to get an HTTPClientResponseMessage that represents the response returned by the Netflix services. For readability, the example just outputs the data in the response to a text file afterwards.<\/p>\n<p>The example below uses an IEdmModel not used in the writer example above. When the ODataMessageReader is created an IEdmModel is passed in as a parameter &ndash; the IEdmModel is essentially an in-memory representation of the metadata about the service that is exposed via the $metadata url. For a client component the easiest way to create the IEdmModel is to use the ReadMetadata method in the OData Library that creates an in-memory IEdmModel by parsing a $metadata document from the server. For a server, you would generally use the APIs included in the Edm Library (Microsoft.Edm.dll) to craft a model. Providing a model for OData parsing provides key benefits:<\/p>\n<p>o The reader will validate that the entities and properties in the documents being parsed conform to the model specified<\/p>\n<p>o Parsing is done with full type fidelity (i.e. that wire types are converted to the model types when parsed); this is especially important when parsing JSON because the JSON format only preserves 4 types and the OData protocol supports many more. There are configuration options to change how this is done, but I won&rsquo;t discuss them here for space reasons.<\/p>\n<p>o If the service defines feed customizations, the model contains their definitions and the readers (and writers) will only know to apply them correctly if provided a model.<\/p>\n<p>o JSON can only be parsed when a model is provided (this is a limitation of the library and we may add JSON parsing without a model at some point in the future). ATOM parsing without a model is supported.<\/p>\n<p>In the example below an ODataFeedReader is created out of the ResponseMessageReader to read the contents of the response stream. The reader works like the XmlReader in the System.XML library, with which many of you will be familiar. Calling the Read() method moves the reader through the document, and each time Read() is called the reader changes to a specific state that depends on what the reader is currently reading, which is represented by an &ldquo;Item&rdquo;. For instance, when the reader reads an entry in the feed, it will go to the StartEntry state, and the Item on the reader will be the ODataEntry being read &ndash;there are similar states for Feeds and Links. Importantly, when the reader is in a start state (StartEntry, StartFeed, StartLink, etc) the reader will have an Item it has created to hold the Entry\/Feed\/Link that it is reading, but the Item will be mostly empty because the reader has not actually read it yet. It&rsquo;s only when the reader gets to the end states (EndEntry, EndFeed, EndLink) that the Item will be fully populated with data.&nbsp;&nbsp;<\/p>\n<div>\n<div style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\" id=\"codeSnippet\">\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum1\"> 1:<\/span> <span style=\"color: #0000ff\">public<\/span> <span style=\"color: #0000ff\">void<\/span> ExecuteNetflixRequest(IEdmModel model, <span style=\"color: #0000ff\">string<\/span> fileName)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum2\"> 2:<\/span> {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum3\"> 3:<\/span>     <span style=\"color: #008000\">\/\/we are going to create a GET request to the OData Netflix Catalog<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum4\"> 4:<\/span>     HTTPClientRequestMessage message = <span style=\"color: #0000ff\">new<\/span> HTTPClientRequestMessage(<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"color: #006080\">\"http:\/\/odata.netflix.com\/v2\/Catalog\/Genres\"<\/span>);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum5\"> 5:<\/span>     message.SetHeader(<span style=\"color: #006080\">\"Accept\"<\/span>, <span style=\"color: #006080\">\"application\/json\"<\/span>);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum6\"> 6:<\/span>     message.SetHeader(<span style=\"color: #006080\">\"DataServiceVersion\"<\/span>, <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ODataUtils.ODataVersionToString(ODataVersion.V2));<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum7\"> 7:<\/span>     message.SetHeader(<span style=\"color: #006080\">\"MaxDataServiceVersion\"<\/span>, <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ODataUtils.ODataVersionToString(ODataVersion.V2));<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum8\"> 8:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum9\"> 9:<\/span>     <span style=\"color: #008000\">\/\/create a text file to write the response to and create a textwriter<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum10\"> 10:<\/span>     <span style=\"color: #0000ff\">string<\/span> filePath = fileName;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum11\"> 11:<\/span>     <span style=\"color: #0000ff\">using<\/span> (StreamWriter outputWriter = <span style=\"color: #0000ff\">new<\/span> StreamWriter(filePath))<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum12\"> 12:<\/span>     {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum13\"> 13:<\/span>         <span style=\"color: #008000\">\/\/use an indented text writer for readability<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum14\"> 14:<\/span>         <span style=\"color: #0000ff\">this<\/span>.writer = <span style=\"color: #0000ff\">new<\/span> IndentedTextWriter(outputWriter, <span style=\"color: #006080\">\" \"<\/span>);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum15\"> 15:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum16\"> 16:<\/span>         <span style=\"color: #008000\">\/\/issue the request and get the response as an ODataMessage. <br \/> \/\/Create an ODataMessageReader over the response <\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum17\"> 17:<\/span>         <span style=\"color: #008000\">\/\/we will use the model when creating the reader <br \/> \/\/as this will tell the library to validate when parsing<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum18\"> 18:<\/span>         <span style=\"color: #0000ff\">using<\/span> (ODataMessageReader messageReader = <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"color: #0000ff\">new<\/span> ODataMessageReader(message.GetResponse(), <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum19\"> 19:<\/span>             <span style=\"color: #0000ff\">new<\/span> ODataMessageReaderSettings(), model))<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum20\"> 20:<\/span>         {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum21\"> 21:<\/span>             <span style=\"color: #008000\">\/\/create a feed reader <\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum22\"> 22:<\/span>             ODataReader reader = messageReader.CreateODataFeedReader();<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum23\"> 23:<\/span>             <span style=\"color: #0000ff\">while<\/span> (reader.Read())<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum24\"> 24:<\/span>             {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum25\"> 25:<\/span>                 <span style=\"color: #0000ff\">switch<\/span> (reader.State)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum26\"> 26:<\/span>                 {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum27\"> 27:<\/span>                     <span style=\"color: #0000ff\">case<\/span> ODataReaderState.FeedStart: <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum28\"> 28:<\/span>                         {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum29\"> 29:<\/span>                             <span style=\"color: #008000\">\/\/this is just the beginning of the feed, <br \/> \/\/data will not be parsed yet<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum30\"> 30:<\/span>                             ODataFeed feed = (ODataFeed)reader.Item;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum31\"> 31:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.WriteLine(<span style=\"color: #006080\">\"ODataFeed:\"<\/span>);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum32\"> 32:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.Indent++;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum33\"> 33:<\/span>                         }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum34\"> 34:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum35\"> 35:<\/span>                         <span style=\"color: #0000ff\">break<\/span>;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum36\"> 36:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum37\"> 37:<\/span>                     <span style=\"color: #0000ff\">case<\/span> ODataReaderState.FeedEnd:<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum38\"> 38:<\/span>                         {<\/pre>\n<p><!--CRLF--><\/p>\n<p><span style=\"color: #606060\" id=\"lnum39\"> 39:<\/span> <span style=\"color: #008000\">\/\/this is the end of feed state. <br \/> \/\/The entire message <br \/> \/\/<\/span><span style=\"color: #008000\">has been read at this point<\/span><\/p>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum40\"> 40:<\/span>                             ODataFeed feed = (ODataFeed)reader.Item;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum41\"> 41:<\/span>                             <span style=\"color: #0000ff\">if<\/span> (feed.Count != <span style=\"color: #0000ff\">null<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum42\"> 42:<\/span>                             {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum43\"> 43:<\/span>                                 <span style=\"color: #008000\">\/\/if there is an inlinecount value<br \/> \/\/ write the value out<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum44\"> 44:<\/span>                                 <span style=\"color: #0000ff\">this<\/span>.writer.WriteLine(<span style=\"color: #006080\">\"Count: \"<\/span> + <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; feed.Count.ToString());<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum45\"> 45:<\/span>                             }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum46\"> 46:<\/span>                             <span style=\"color: #0000ff\">if<\/span> (feed.NextPageLink != <span style=\"color: #0000ff\">null<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum47\"> 47:<\/span>                             {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum48\"> 48:<\/span>                                 <span style=\"color: #008000\">\/\/if there is a next link <br \/> \/\/write that link as well<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum49\"> 49:<\/span>                                 <span style=\"color: #0000ff\">this<\/span>.writer.WriteLine(<span style=\"color: #006080\">\"NextPageLink: \"<\/span> + <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; feed.NextPageLink.AbsoluteUri);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum50\"> 50:<\/span>                             }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum51\"> 51:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum52\"> 52:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.Indent--;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum53\"> 53:<\/span>                         }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum54\"> 54:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum55\"> 55:<\/span>                         <span style=\"color: #0000ff\">break<\/span>;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum56\"> 56:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum57\"> 57:<\/span>                     <span style=\"color: #0000ff\">case<\/span> ODataReaderState.EntryStart:<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum58\"> 58:<\/span>                         {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum59\"> 59:<\/span>                             <span style=\"color: #008000\">\/\/this is just the start of the entry. <\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum60\"> 60:<\/span>                             <span style=\"color: #008000\">\/\/Properties of the entity will not be parsed yet<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum61\"> 61:<\/span>                             ODataEntry entry = (ODataEntry)reader.Item;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum62\"> 62:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.WriteLine(<span style=\"color: #006080\">\"ODataEntry:\"<\/span>);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum63\"> 63:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.Indent++;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum64\"> 64:<\/span>                         }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum65\"> 65:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum66\"> 66:<\/span>                         <span style=\"color: #0000ff\">break<\/span>;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum67\"> 67:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum68\"> 68:<\/span>                     <span style=\"color: #0000ff\">case<\/span> ODataReaderState.EntryEnd:<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum69\"> 69:<\/span>                         {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum70\"> 70:<\/span>                             <span style=\"color: #008000\">\/\/at the point the whole entry has been read<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum71\"> 71:<\/span>                             <span style=\"color: #008000\">\/\/and the properties of the entity are available<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum72\"> 72:<\/span>                             ODataEntry entry = (ODataEntry)reader.Item;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum73\"> 73:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.WriteLine(<span style=\"color: #006080\">\"TypeName: \"<\/span> <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + (entry.TypeName ?? <span style=\"color: #006080\">\"&lt;null&gt;\"<\/span>));<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum74\"> 74:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.WriteLine(<span style=\"color: #006080\">\"Id: \"<\/span> <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + (entry.Id ?? <span style=\"color: #006080\">\"&lt;null&gt;\"<\/span>));<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum75\"> 75:<\/span>                             <span style=\"color: #0000ff\">if<\/span> (entry.ReadLink != <span style=\"color: #0000ff\">null<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum76\"> 76:<\/span>                             {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum77\"> 77:<\/span>                                 <span style=\"color: #0000ff\">this<\/span>.writer.WriteLine(<span style=\"color: #006080\">\"ReadLink: \"<\/span> <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + entry.ReadLink.AbsoluteUri);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum78\"> 78:<\/span>                             }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum79\"> 79:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum80\"> 80:<\/span>                             <span style=\"color: #0000ff\">if<\/span> (entry.EditLink != <span style=\"color: #0000ff\">null<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum81\"> 81:<\/span>                             {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum82\"> 82:<\/span>                                 <span style=\"color: #0000ff\">this<\/span>.writer.WriteLine(<span style=\"color: #006080\">\"EditLink: \"<\/span> <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + entry.EditLink.AbsoluteUri);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum83\"> 83:<\/span>                             }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum84\"> 84:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum85\"> 85:<\/span>                             <span style=\"color: #0000ff\">if<\/span> (entry.MediaResource != <span style=\"color: #0000ff\">null<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum86\"> 86:<\/span>                             {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum87\"> 87:<\/span>                                 <span style=\"color: #0000ff\">this<\/span>.writer.Write(<span style=\"color: #006080\">\"MediaResource: \"<\/span>);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum88\"> 88:<\/span>                                 <span style=\"color: #0000ff\">this<\/span>.WriteValue(entry.MediaResource);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum89\"> 89:<\/span>                             }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum90\"> 90:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum91\"> 91:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.WriteProperties(entry.Properties);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum92\"> 92:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum93\"> 93:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.Indent--;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum94\"> 94:<\/span>                         }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum95\"> 95:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum96\"> 96:<\/span>                         <span style=\"color: #0000ff\">break<\/span>;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum97\"> 97:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum98\"> 98:<\/span>                     <span style=\"color: #0000ff\">case<\/span> ODataReaderState.NavigationLinkStart:<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum99\"> 99:<\/span>                         {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum100\"> 100:<\/span>                             <span style=\"color: #008000\">\/\/navigation links have their own states. <\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum101\"> 101:<\/span>                             <span style=\"color: #008000\">\/\/This could be an expanded link and include <br \/> \/\/an entire expanded entry or feed.<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum102\"> 102:<\/span>                             ODataNavigationLink navigationLink = <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ODataNavigationLink)reader.Item;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum103\"> 103:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.WriteLine(navigationLink.Name <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + <span style=\"color: #006080\">\": ODataNavigationLink: \"<\/span>);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum104\"> 104:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.Indent++;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum105\"> 105:<\/span>                         }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum106\"> 106:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum107\"> 107:<\/span>                         <span style=\"color: #0000ff\">break<\/span>;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum108\"> 108:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum109\"> 109:<\/span>                     <span style=\"color: #0000ff\">case<\/span> ODataReaderState.NavigationLinkEnd:<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum110\"> 110:<\/span>                         {<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum111\"> 111:<\/span>                             ODataNavigationLink navigationLink = <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ODataNavigationLink)reader.Item;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum112\"> 112:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.WriteLine(<span style=\"color: #006080\">\"Url: \"<\/span> + <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum113\"> 113:<\/span>                                 (navigationLink.Url == <span style=\"color: #0000ff\">null<\/span> ? <span style=\"color: #006080\">\"&lt;null&gt;\"<\/span> <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : navigationLink.Url.AbsoluteUri));<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum114\"> 114:<\/span>                             <span style=\"color: #0000ff\">this<\/span>.writer.Indent--;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum115\"> 115:<\/span>                         }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum116\"> 116:<\/span>&nbsp; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum117\"> 117:<\/span>                         <span style=\"color: #0000ff\">break<\/span>;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum118\"> 118:<\/span>                 }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum119\"> 119:<\/span>             }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum120\"> 120:<\/span>         }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: white;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum121\"> 121:<\/span>     }<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left;line-height: 12pt;background-color: #f4f4f4;margin: 0em;width: 100%;font-family: 'Courier New', courier, monospace;direction: ltr;color: black;font-size: 8pt;overflow: visible;border-style: none;padding: 0px\"><span style=\"color: #606060\" id=\"lnum122\"> 122:<\/span> }<\/pre>\n<p><!--CRLF--><\/div>\n<\/div>\n<p>This is a quick introduction to the new OData Library included in this CTP. The post&rsquo;s attached samples walk through the basics of OData feed creation and consumption via the library. We welcome any feedback you have on the library so don&rsquo;t hesitate to contact us.<\/p>\n<p>Shayne Burgess <br \/>Program Manager &ndash; OData Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; This blog talks about a new feature delivered in the WCF Data Services October CTP that can be downloaded here. WCF Data Services&rsquo; latest CTP includes a new stand-alone library for working directly with OData. The library makes public some underpinnings of WCF Data Services (the server and client library), and we made this [&hellip;]<\/p>\n","protected":false},"author":512,"featured_media":3253,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-853","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-odata"],"acf":[],"blog_post_summary":"<p>&nbsp; This blog talks about a new feature delivered in the WCF Data Services October CTP that can be downloaded here. WCF Data Services&rsquo; latest CTP includes a new stand-alone library for working directly with OData. The library makes public some underpinnings of WCF Data Services (the server and client library), and we made this [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/posts\/853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/users\/512"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/comments?post=853"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/posts\/853\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/media\/3253"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/media?parent=853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/categories?post=853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/tags?post=853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}