1<!DOCTYPE html> 2<html lang="en"> 3<head> 4<meta charset="UTF-8"> 5<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body> 6<script type="text/javascript">/* <![CDATA[ */ 7function get_sym_list(){return [["Class","xc",[["Serialization",52],["WrappedDeserializer",203],["WrappedSerializer",109]]],["Namespace","xn",[["Microsoft.PowerShell",43]]],["Enum","xe",[["DataFormat",61]]],["Typedef","xt",[["Dbg",39]]],["Method","xmt",[["Deserialize",243],["End",172],["End",314],["Serialization",90],["Serialize",141],["Serialize",148],["WrappedDeserializer",206],["WrappedSerializer",112]]]];} /* ]]> */</script><a class="l" name="1" href="#1">1</a><span class='fold-space'> </span><span class="c">/* 8<a class="l" name="2" href="#2">2</a><span class='fold-space'> </span>PowerShell 6.0 9<a class="l" name="3" href="#3">3</a><span class='fold-space'> </span> 10<a class="l" name="4" href="#4">4</a><span class='fold-space'> </span>Copyright (c) Microsoft Corporation. All rights reserved. 11<a class="l" name="5" href="#5">5</a><span class='fold-space'> </span> 12<a class="l" name="6" href="#6">6</a><span class='fold-space'> </span>All rights reserved. 13<a class="l" name="7" href="#7">7</a><span class='fold-space'> </span> 14<a class="l" name="8" href="#8">8</a><span class='fold-space'> </span>MIT License 15<a class="l" name="9" href="#9">9</a><span class='fold-space'> </span> 16<a class="hl" name="10" href="#10">10</a><span class='fold-space'> </span>Permission is hereby granted, free of charge, to any person obtaining a copy 17<a class="l" name="11" href="#11">11</a><span class='fold-space'> </span>of this software and associated documentation files (the ""Software""), to deal 18<a class="l" name="12" href="#12">12</a><span class='fold-space'> </span>in the Software without restriction, including without limitation the rights 19<a class="l" name="13" href="#13">13</a><span class='fold-space'> </span>to use, copy, modify, merge, publish, distribute, sublicense, <a href="/source/s?path=and/">and</a>/<a href="/source/s?path=and/or">or</a> sell 20<a class="l" name="14" href="#14">14</a><span class='fold-space'> </span>copies of the Software, and to permit persons to whom the Software is 21<a class="l" name="15" href="#15">15</a><span class='fold-space'> </span>furnished to do so, subject to the following conditions: 22<a class="l" name="16" href="#16">16</a><span class='fold-space'> </span> 23<a class="l" name="17" href="#17">17</a><span class='fold-space'> </span>The above copyright notice and this permission notice shall be included in all 24<a class="l" name="18" href="#18">18</a><span class='fold-space'> </span>copies or substantial portions of the Software. 25<a class="l" name="19" href="#19">19</a><span class='fold-space'> </span> 26<a class="hl" name="20" href="#20">20</a><span class='fold-space'> </span>THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27<a class="l" name="21" href="#21">21</a><span class='fold-space'> </span>IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28<a class="l" name="22" href="#22">22</a><span class='fold-space'> </span>FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29<a class="l" name="23" href="#23">23</a><span class='fold-space'> </span>AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30<a class="l" name="24" href="#24">24</a><span class='fold-space'> </span>LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31<a class="l" name="25" href="#25">25</a><span class='fold-space'> </span>OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32<a class="l" name="26" href="#26">26</a><span class='fold-space'> </span>SOFTWARE. 33<a class="l" name="27" href="#27">27</a><span class='fold-space'> </span>*/</span> 34<a class="l" name="28" href="#28">28</a><span class='fold-space'> </span> 35<a class="l" name="29" href="#29">29</a><span class='fold-space'> </span><span class="c">/********************************************************************++ 36<a class="hl" name="30" href="#30">30</a><span class='fold-space'> </span>Copyright (c) Microsoft Corporation. All rights reserved. 37<a class="l" name="31" href="#31">31</a><span class='fold-space'> </span>--********************************************************************/</span> 38<a class="l" name="32" href="#32">32</a><span class='fold-space'> </span> 39<a class="l" name="33" href="#33">33</a><span class='fold-space'> </span><b>using</b> <a href="/source/s?defs=System" class="intelliWindow-symbol" data-definition-place="undefined-in-file">System</a>; 40<a class="l" name="34" href="#34">34</a><span class='fold-space'> </span><b>using</b> <a href="/source/s?defs=System" class="intelliWindow-symbol" data-definition-place="undefined-in-file">System</a>.<a href="/source/s?defs=IO" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IO</a>; 41<a class="l" name="35" href="#35">35</a><span class='fold-space'> </span><b>using</b> <a href="/source/s?defs=System" class="intelliWindow-symbol" data-definition-place="undefined-in-file">System</a>.<a href="/source/s?defs=Management" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Management</a>.<a href="/source/s?defs=Automation" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Automation</a>; 42<a class="l" name="36" href="#36">36</a><span class='fold-space'> </span><b>using</b> <a href="/source/s?defs=System" class="intelliWindow-symbol" data-definition-place="undefined-in-file">System</a>.<a href="/source/s?defs=Xml" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Xml</a>; 43<a class="l" name="37" href="#37">37</a><span class='fold-space'> </span> 44<a class="l" name="38" href="#38">38</a><span class='fold-space'> </span> 45<a class="l" name="39" href="#39">39</a><span class='fold-space'> </span><b>using</b> <a class="xt" name="Dbg"/><a href="/source/s?refs=Dbg" class="xt intelliWindow-symbol" data-definition-place="def">Dbg</a> = <a href="/source/s?defs=System" class="intelliWindow-symbol" data-definition-place="undefined-in-file">System</a>.<a href="/source/s?defs=Management" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Management</a>.<a href="/source/s?defs=Automation" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Automation</a>.<a href="/source/s?defs=Diagnostics" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Diagnostics</a>; 46<a class="hl" name="40" href="#40">40</a><span class='fold-space'> </span> 47<a class="l" name="41" href="#41">41</a><span class='fold-space'> </span> 48<a class="l" name="42" href="#42">42</a><span class='fold-space'> </span> 49<a class="l" name="43" href="#43">43</a><span class='fold-space'> </span><b>namespace</b> <a href="/source/s?defs=Microsoft" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Microsoft</a>.<a href="/source/s?defs=PowerShell" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PowerShell</a> 50<a class="l" name="44" href="#44">44</a><span class='fold-space'> </span>{ 51<a class="l" name="45" href="#45">45</a><span class='fold-space'> </span> <span class="c">/// <summary></span> 52<a class="l" name="46" href="#46">46</a><span class='fold-space'> </span> <span class="c">///</span> 53<a class="l" name="47" href="#47">47</a><span class='fold-space'> </span> <span class="c">/// Wraps Hitesh's xml serializer in such a way that it will select the proper serializer based on the data</span> 54<a class="l" name="48" href="#48">48</a><span class='fold-space'> </span> <span class="c">/// format.</span> 55<a class="l" name="49" href="#49">49</a><span class='fold-space'> </span> <span class="c">///</span> 56<a class="hl" name="50" href="#50">50</a><span class='fold-space'> </span> <span class="c">/// </summary></span> 57<a class="l" name="51" href="#51">51</a><span class='fold-space'> </span> 58<a class="l" name="52" href="#52">52</a><span class='fold-space'> </span> <b>internal</b> <b>class</b> <a class="xc" name="Serialization"/><a href="/source/s?refs=Serialization" class="xc intelliWindow-symbol" data-definition-place="def">Serialization</a> 59<a class="l" name="53" href="#53">53</a><span class='fold-space'> </span> { 60<a class="l" name="54" href="#54">54</a><span class='fold-space'> </span> <span class="c">/// <summary></span> 61<a class="l" name="55" href="#55">55</a><span class='fold-space'> </span> <span class="c">///</span> 62<a class="l" name="56" href="#56">56</a><span class='fold-space'> </span> <span class="c">/// Describes the format of the data streamed between minishells, e.g. the allowed arguments to the minishell</span> 63<a class="l" name="57" href="#57">57</a><span class='fold-space'> </span> <span class="c">/// -outputformat and -inputformat command line parameters.</span> 64<a class="l" name="58" href="#58">58</a><span class='fold-space'> </span> <span class="c">///</span> 65<a class="l" name="59" href="#59">59</a><span class='fold-space'> </span> <span class="c">/// </summary></span> 66<a class="hl" name="60" href="#60">60</a><span class='fold-space'> </span> 67<a class="l" name="61" href="#61">61</a><span class='fold-space'> </span> <b>internal</b> <b>enum</b> <a class="xe" name="DataFormat"/><a href="/source/s?refs=DataFormat" class="xe intelliWindow-symbol" data-definition-place="def">DataFormat</a> 68<a class="l" name="62" href="#62">62</a><span class='fold-space'> </span> { 69<a class="l" name="63" href="#63">63</a><span class='fold-space'> </span> <span class="c">/// <summary></span> 70<a class="l" name="64" href="#64">64</a><span class='fold-space'> </span> <span class="c">///</span> 71<a class="l" name="65" href="#65">65</a><span class='fold-space'> </span> <span class="c">/// text format -- i.e. stream text just as out-default would display it.</span> 72<a class="l" name="66" href="#66">66</a><span class='fold-space'> </span> <span class="c">///</span> 73<a class="l" name="67" href="#67">67</a><span class='fold-space'> </span> <span class="c">/// </summary></span> 74<a class="l" name="68" href="#68">68</a><span class='fold-space'> </span> 75<a class="l" name="69" href="#69">69</a><span class='fold-space'> </span> <a class="xer" name="Text"/><a href="/source/s?refs=Text" class="xer intelliWindow-symbol" data-definition-place="def">Text</a> = <span class="n">0</span>, 76<a class="hl" name="70" href="#70">70</a><span class='fold-space'> </span> 77<a class="l" name="71" href="#71">71</a><span class='fold-space'> </span> <span class="c">/// <summary></span> 78<a class="l" name="72" href="#72">72</a><span class='fold-space'> </span> <span class="c">///</span> 79<a class="l" name="73" href="#73">73</a><span class='fold-space'> </span> <span class="c">/// XML-serialized format</span> 80<a class="l" name="74" href="#74">74</a><span class='fold-space'> </span> <span class="c">///</span> 81<a class="l" name="75" href="#75">75</a><span class='fold-space'> </span> <span class="c">/// </summary></span> 82<a class="l" name="76" href="#76">76</a><span class='fold-space'> </span> 83<a class="l" name="77" href="#77">77</a><span class='fold-space'> </span> <a class="xer" name="XML"/><a href="/source/s?refs=XML" class="xer intelliWindow-symbol" data-definition-place="def">XML</a> = <span class="n">0xFF</span>, 84<a class="l" name="78" href="#78">78</a><span class='fold-space'> </span> 85<a class="l" name="79" href="#79">79</a><span class='fold-space'> </span> <span class="c">/// <summary></span> 86<a class="hl" name="80" href="#80">80</a><span class='fold-space'> </span> <span class="c">///</span> 87<a class="l" name="81" href="#81">81</a><span class='fold-space'> </span> <span class="c">/// Indicates that the data should be discarded instead of processed.</span> 88<a class="l" name="82" href="#82">82</a><span class='fold-space'> </span> <span class="c">///</span> 89<a class="l" name="83" href="#83">83</a><span class='fold-space'> </span> <span class="c">/// </summary></span> 90<a class="l" name="84" href="#84">84</a><span class='fold-space'> </span> <a class="xer" name="None"/><a href="/source/s?refs=None" class="xer intelliWindow-symbol" data-definition-place="def">None</a> = <span class="n">2</span> 91<a class="l" name="85" href="#85">85</a><span class='fold-space'> </span> } 92<a class="l" name="86" href="#86">86</a><span class='fold-space'> </span> 93<a class="l" name="87" href="#87">87</a><span class='fold-space'> </span> 94<a class="l" name="88" href="#88">88</a><span class='fold-space'> </span> 95<a class="l" name="89" href="#89">89</a><span class='fold-space'> </span> <b>protected</b> 96<span id='scope_id_1140b754' class='scope-head'><span class='scope-signature'>Serialization(DataFormat dataFormat, string streamName)</span><a class="hl" name="90" href="#90">90</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_1140b754_fold_icon'><span class='fold-icon'> </span></a> <a class="xmt" name="Serialization"/><a href="/source/s?refs=Serialization" class="xmt intelliWindow-symbol" data-definition-place="def">Serialization</a>(<a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a> <a class="xa" name="dataFormat"/><a href="/source/s?refs=dataFormat" class="xa intelliWindow-symbol" data-definition-place="def">dataFormat</a>, <b>string</b> <a class="xa" name="streamName"/><a href="/source/s?refs=streamName" class="xa intelliWindow-symbol" data-definition-place="def">streamName</a>)</span> 97<span id='scope_id_1140b754_fold' class='scope-body'><a class="l" name="91" href="#91">91</a><span class='fold-space'> </span> { 98<a class="l" name="92" href="#92">92</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#Dbg" data-definition-place="defined-in-file">Dbg</a>.<a href="/source/s?defs=Assert" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Assert</a>(!<b>string</b>.<a href="/source/s?defs=IsNullOrEmpty" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IsNullOrEmpty</a>(<a href="/source/s?defs=streamName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">streamName</a>), <span class="s">"stream needs a name"</span>); 99<a class="l" name="93" href="#93">93</a><span class='fold-space'> </span> 100<a class="l" name="94" href="#94">94</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#format" data-definition-place="defined-in-file">format</a> = <a href="/source/s?defs=dataFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">dataFormat</a>; 101<a class="l" name="95" href="#95">95</a><span class='fold-space'> </span> <b>this</b>.<a href="/source/s?defs=streamName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">streamName</a> = <a href="/source/s?defs=streamName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">streamName</a>; 102<a class="l" name="96" href="#96">96</a><span class='fold-space'> </span> } 103</span><a class="l" name="97" href="#97">97</a><span class='fold-space'> </span> 104<a class="l" name="98" href="#98">98</a><span class='fold-space'> </span> 105<a class="l" name="99" href="#99">99</a><span class='fold-space'> </span> 106<a class="hl" name="100" href="#100">100</a><span class='fold-space'> </span> <b>protected</b> <b>static</b> <b>string</b> <a class="xfld" name="XmlCliTag"/><a href="/source/s?refs=XmlCliTag" class="xfld intelliWindow-symbol" data-definition-place="def">XmlCliTag</a> = <span class="s">"#< CLIXML"</span>; 107<a class="l" name="101" href="#101">101</a><span class='fold-space'> </span> 108<a class="l" name="102" href="#102">102</a><span class='fold-space'> </span> <b>protected</b> <b>string</b> <a class="xfld" name="streamName"/><a href="/source/s?refs=streamName" class="xfld intelliWindow-symbol" data-definition-place="def">streamName</a>; 109<a class="l" name="103" href="#103">103</a><span class='fold-space'> </span> <b>protected</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a> <a class="xfld" name="format"/><a href="/source/s?refs=format" class="xfld intelliWindow-symbol" data-definition-place="def">format</a>; 110<a class="l" name="104" href="#104">104</a><span class='fold-space'> </span> } 111<a class="l" name="105" href="#105">105</a><span class='fold-space'> </span> 112<a class="l" name="106" href="#106">106</a><span class='fold-space'> </span> 113<a class="l" name="107" href="#107">107</a><span class='fold-space'> </span> 114<a class="l" name="108" href="#108">108</a><span class='fold-space'> </span> <b>internal</b> 115<a class="l" name="109" href="#109">109</a><span class='fold-space'> </span> <b>class</b> <a class="xc" name="WrappedSerializer"/><a href="/source/s?refs=WrappedSerializer" class="xc intelliWindow-symbol" data-definition-place="def">WrappedSerializer</a> : <a href="/source/s?defs=Serialization" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Serialization</a> 116<a class="hl" name="110" href="#110">110</a><span class='fold-space'> </span> { 117<a class="l" name="111" href="#111">111</a><span class='fold-space'> </span> <b>internal</b> 118<span id='scope_id_51521845' class='scope-head'><span class='scope-signature'>WrappedSerializer(DataFormat dataFormat, string streamName, TextWriter output)</span><a class="l" name="112" href="#112">112</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_51521845_fold_icon'><span class='fold-icon'> </span></a> <a class="xmt" name="WrappedSerializer"/><a href="/source/s?refs=WrappedSerializer" class="xmt intelliWindow-symbol" data-definition-place="def">WrappedSerializer</a>(<a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a> <a class="xa" name="dataFormat"/><a href="/source/s?refs=dataFormat" class="xa intelliWindow-symbol" data-definition-place="def">dataFormat</a>, <b>string</b> <a class="xa" name="streamName"/><a href="/source/s?refs=streamName" class="xa intelliWindow-symbol" data-definition-place="def">streamName</a>, <a href="/source/s?defs=TextWriter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">TextWriter</a> <a class="xa" name="output"/><a href="/source/s?refs=output" class="xa intelliWindow-symbol" data-definition-place="def">output</a>)</span> 119<span id='scope_id_51521845_fold' class='scope-body'><a class="l" name="113" href="#113">113</a><span class='fold-space'> </span> : 120<a class="l" name="114" href="#114">114</a><span class='fold-space'> </span> <b>base</b>(<a href="/source/s?defs=dataFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">dataFormat</a>, <a href="/source/s?defs=streamName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">streamName</a>) 121<a class="l" name="115" href="#115">115</a><span class='fold-space'> </span> { 122<a class="l" name="116" href="#116">116</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#Dbg" data-definition-place="defined-in-file">Dbg</a>.<a href="/source/s?defs=Assert" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Assert</a>(<a class="d intelliWindow-symbol" href="#output" data-definition-place="defined-in-file">output</a> != <b>null</b>, <span class="s">"output should have a value"</span>); 123<a class="l" name="117" href="#117">117</a><span class='fold-space'> </span> 124<a class="l" name="118" href="#118">118</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#textWriter" data-definition-place="defined-in-file">textWriter</a> = <a class="d intelliWindow-symbol" href="#output" data-definition-place="defined-in-file">output</a>; 125<a class="l" name="119" href="#119">119</a><span class='fold-space'> </span> <b>switch</b> (<a class="d intelliWindow-symbol" href="#format" data-definition-place="defined-in-file">format</a>) 126<a class="hl" name="120" href="#120">120</a><span class='fold-space'> </span> { 127<a class="l" name="121" href="#121">121</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#XML" data-definition-place="defined-in-file">XML</a>: 128<a class="l" name="122" href="#122">122</a><span class='fold-space'> </span> <a href="/source/s?defs=XmlWriterSettings" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XmlWriterSettings</a> <a href="/source/s?defs=settings" class="intelliWindow-symbol" data-definition-place="undefined-in-file">settings</a> = <b>new</b> <a href="/source/s?defs=XmlWriterSettings" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XmlWriterSettings</a>(); 129<a class="l" name="123" href="#123">123</a><span class='fold-space'> </span> <a href="/source/s?defs=settings" class="intelliWindow-symbol" data-definition-place="undefined-in-file">settings</a>.<a href="/source/s?defs=CheckCharacters" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CheckCharacters</a> = <b>false</b>; 130<a class="l" name="124" href="#124">124</a><span class='fold-space'> </span> <a href="/source/s?defs=settings" class="intelliWindow-symbol" data-definition-place="undefined-in-file">settings</a>.<a href="/source/s?defs=OmitXmlDeclaration" class="intelliWindow-symbol" data-definition-place="undefined-in-file">OmitXmlDeclaration</a> = <b>true</b>; 131<a class="l" name="125" href="#125">125</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_xmlWriter" data-definition-place="defined-in-file">_xmlWriter</a> = <a href="/source/s?defs=XmlWriter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XmlWriter</a>.<a href="/source/s?defs=Create" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Create</a>(<a class="d intelliWindow-symbol" href="#textWriter" data-definition-place="defined-in-file">textWriter</a>, <a href="/source/s?defs=settings" class="intelliWindow-symbol" data-definition-place="undefined-in-file">settings</a>); 132<a class="l" name="126" href="#126">126</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_xmlSerializer" data-definition-place="defined-in-file">_xmlSerializer</a> = <b>new</b> <a href="/source/s?defs=Serializer" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Serializer</a>(<a class="d intelliWindow-symbol" href="#_xmlWriter" data-definition-place="defined-in-file">_xmlWriter</a>); 133<a class="l" name="127" href="#127">127</a><span class='fold-space'> </span> <b>break</b>; 134<a class="l" name="128" href="#128">128</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#Text" data-definition-place="defined-in-file">Text</a>: 135<a class="l" name="129" href="#129">129</a><span class='fold-space'> </span> <b>default</b>: 136<a class="hl" name="130" href="#130">130</a><span class='fold-space'> </span> <span class="c">// do nothing; we'll just write to the TextWriter</span> 137<a class="l" name="131" href="#131">131</a><span class='fold-space'> </span> <span class="c">// or discard it.</span> 138<a class="l" name="132" href="#132">132</a><span class='fold-space'> </span> 139<a class="l" name="133" href="#133">133</a><span class='fold-space'> </span> <b>break</b>; 140<a class="l" name="134" href="#134">134</a><span class='fold-space'> </span> } 141<a class="l" name="135" href="#135">135</a><span class='fold-space'> </span> } 142</span><a class="l" name="136" href="#136">136</a><span class='fold-space'> </span> 143<a class="l" name="137" href="#137">137</a><span class='fold-space'> </span> 144<a class="l" name="138" href="#138">138</a><span class='fold-space'> </span> 145<a class="l" name="139" href="#139">139</a><span class='fold-space'> </span> <b>internal</b> 146<a class="hl" name="140" href="#140">140</a><span class='fold-space'> </span> <b>void</b> 147<span id='scope_id_b5ee0885' class='scope-head'><span class='scope-signature'>Serialize(object o)</span><a class="l" name="141" href="#141">141</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_b5ee0885_fold_icon'><span class='fold-icon'> </span></a> <a class="xmt" name="Serialize"/><a href="/source/s?refs=Serialize" class="xmt intelliWindow-symbol" data-definition-place="def">Serialize</a>(<b>object</b> <a class="xa" name="o"/><a href="/source/s?refs=o" class="xa intelliWindow-symbol" data-definition-place="def">o</a>)</span> 148<span id='scope_id_b5ee0885_fold' class='scope-body'><a class="l" name="142" href="#142">142</a><span class='fold-space'> </span> { 149<a class="l" name="143" href="#143">143</a><span class='fold-space'> </span> <a href="/source/s?defs=Serialize" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Serialize</a>(<a href="/source/s?defs=o" class="intelliWindow-symbol" data-definition-place="undefined-in-file">o</a>, <b>this</b>.<a href="/source/s?defs=streamName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">streamName</a>); 150<a class="l" name="144" href="#144">144</a><span class='fold-space'> </span> } 151</span><a class="l" name="145" href="#145">145</a><span class='fold-space'> </span> 152<a class="l" name="146" href="#146">146</a><span class='fold-space'> </span> <b>internal</b> 153<a class="l" name="147" href="#147">147</a><span class='fold-space'> </span> <b>void</b> 154<span id='scope_id_4b08972e' class='scope-head'><span class='scope-signature'>Serialize(object o, string streamName)</span><a class="l" name="148" href="#148">148</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_4b08972e_fold_icon'><span class='fold-icon'> </span></a> <a class="xmt" name="Serialize"/><a href="/source/s?refs=Serialize" class="xmt intelliWindow-symbol" data-definition-place="def">Serialize</a>(<b>object</b> <a class="xa" name="o"/><a href="/source/s?refs=o" class="xa intelliWindow-symbol" data-definition-place="def">o</a>, <b>string</b> <a class="xa" name="streamName"/><a href="/source/s?refs=streamName" class="xa intelliWindow-symbol" data-definition-place="def">streamName</a>)</span> 155<span id='scope_id_4b08972e_fold' class='scope-body'><a class="l" name="149" href="#149">149</a><span class='fold-space'> </span> { 156<a class="hl" name="150" href="#150">150</a><span class='fold-space'> </span> <b>switch</b> (<a class="d intelliWindow-symbol" href="#format" data-definition-place="defined-in-file">format</a>) 157<a class="l" name="151" href="#151">151</a><span class='fold-space'> </span> { 158<a class="l" name="152" href="#152">152</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#None" data-definition-place="defined-in-file">None</a>: 159<a class="l" name="153" href="#153">153</a><span class='fold-space'> </span> <b>break</b>; 160<a class="l" name="154" href="#154">154</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#XML" data-definition-place="defined-in-file">XML</a>: 161<a class="l" name="155" href="#155">155</a><span class='fold-space'> </span> <b>if</b> (<a class="d intelliWindow-symbol" href="#_firstCall" data-definition-place="defined-in-file">_firstCall</a>) 162<a class="l" name="156" href="#156">156</a><span class='fold-space'> </span> { 163<a class="l" name="157" href="#157">157</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_firstCall" data-definition-place="defined-in-file">_firstCall</a> = <b>false</b>; 164<a class="l" name="158" href="#158">158</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#textWriter" data-definition-place="defined-in-file">textWriter</a>.<a href="/source/s?defs=WriteLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WriteLine</a>(<a href="/source/s?defs=Serialization" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Serialization</a>.<a class="d intelliWindow-symbol" href="#XmlCliTag" data-definition-place="defined-in-file">XmlCliTag</a>); 165<a class="l" name="159" href="#159">159</a><span class='fold-space'> </span> } 166<a class="hl" name="160" href="#160">160</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_xmlSerializer" data-definition-place="defined-in-file">_xmlSerializer</a>.<a href="/source/s?defs=Serialize" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Serialize</a>(<a href="/source/s?defs=o" class="intelliWindow-symbol" data-definition-place="undefined-in-file">o</a>, <a href="/source/s?defs=streamName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">streamName</a>); 167<a class="l" name="161" href="#161">161</a><span class='fold-space'> </span> <b>break</b>; 168<a class="l" name="162" href="#162">162</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#Text" data-definition-place="defined-in-file">Text</a>: 169<a class="l" name="163" href="#163">163</a><span class='fold-space'> </span> <b>default</b>: 170<a class="l" name="164" href="#164">164</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#textWriter" data-definition-place="defined-in-file">textWriter</a>.<a href="/source/s?defs=Write" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Write</a>(<a href="/source/s?defs=o" class="intelliWindow-symbol" data-definition-place="undefined-in-file">o</a>.<a href="/source/s?defs=ToString" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ToString</a>()); 171<a class="l" name="165" href="#165">165</a><span class='fold-space'> </span> <b>break</b>; 172<a class="l" name="166" href="#166">166</a><span class='fold-space'> </span> } 173<a class="l" name="167" href="#167">167</a><span class='fold-space'> </span> } 174</span><a class="l" name="168" href="#168">168</a><span class='fold-space'> </span> 175<a class="l" name="169" href="#169">169</a><span class='fold-space'> </span> 176<a class="hl" name="170" href="#170">170</a><span class='fold-space'> </span> <b>internal</b> 177<a class="l" name="171" href="#171">171</a><span class='fold-space'> </span> <b>void</b> 178<span id='scope_id_98e273b0' class='scope-head'><span class='scope-signature'>End()</span><a class="l" name="172" href="#172">172</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_98e273b0_fold_icon'><span class='fold-icon'> </span></a> <a class="xmt" name="End"/><a href="/source/s?refs=End" class="xmt intelliWindow-symbol" data-definition-place="def">End</a>()</span> 179<span id='scope_id_98e273b0_fold' class='scope-body'><a class="l" name="173" href="#173">173</a><span class='fold-space'> </span> { 180<a class="l" name="174" href="#174">174</a><span class='fold-space'> </span> <b>switch</b> (<a class="d intelliWindow-symbol" href="#format" data-definition-place="defined-in-file">format</a>) 181<a class="l" name="175" href="#175">175</a><span class='fold-space'> </span> { 182<a class="l" name="176" href="#176">176</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#None" data-definition-place="defined-in-file">None</a>: 183<a class="l" name="177" href="#177">177</a><span class='fold-space'> </span> <span class="c">// do nothing</span> 184<a class="l" name="178" href="#178">178</a><span class='fold-space'> </span> <b>break</b>; 185<a class="l" name="179" href="#179">179</a><span class='fold-space'> </span> 186<a class="hl" name="180" href="#180">180</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#XML" data-definition-place="defined-in-file">XML</a>: 187<a class="l" name="181" href="#181">181</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_xmlSerializer" data-definition-place="defined-in-file">_xmlSerializer</a>.<a href="/source/s?defs=Done" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Done</a>(); 188<a class="l" name="182" href="#182">182</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_xmlSerializer" data-definition-place="defined-in-file">_xmlSerializer</a> = <b>null</b>; 189<a class="l" name="183" href="#183">183</a><span class='fold-space'> </span> <b>break</b>; 190<a class="l" name="184" href="#184">184</a><span class='fold-space'> </span> 191<a class="l" name="185" href="#185">185</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#Text" data-definition-place="defined-in-file">Text</a>: 192<a class="l" name="186" href="#186">186</a><span class='fold-space'> </span> <b>default</b>: 193<a class="l" name="187" href="#187">187</a><span class='fold-space'> </span> <span class="c">// do nothing</span> 194<a class="l" name="188" href="#188">188</a><span class='fold-space'> </span> 195<a class="l" name="189" href="#189">189</a><span class='fold-space'> </span> <b>break</b>; 196<a class="hl" name="190" href="#190">190</a><span class='fold-space'> </span> } 197<a class="l" name="191" href="#191">191</a><span class='fold-space'> </span> } 198</span><a class="l" name="192" href="#192">192</a><span class='fold-space'> </span> 199<a class="l" name="193" href="#193">193</a><span class='fold-space'> </span> 200<a class="l" name="194" href="#194">194</a><span class='fold-space'> </span> <b>internal</b> <a href="/source/s?defs=TextWriter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">TextWriter</a> <a class="xfld" name="textWriter"/><a href="/source/s?refs=textWriter" class="xfld intelliWindow-symbol" data-definition-place="def">textWriter</a>; 201<a class="l" name="195" href="#195">195</a><span class='fold-space'> </span> <b>private</b> <a href="/source/s?defs=XmlWriter" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XmlWriter</a> <a class="xfld" name="_xmlWriter"/><a href="/source/s?refs=_xmlWriter" class="xfld intelliWindow-symbol" data-definition-place="def">_xmlWriter</a>; 202<a class="l" name="196" href="#196">196</a><span class='fold-space'> </span> <b>private</b> <a href="/source/s?defs=Serializer" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Serializer</a> <a class="xfld" name="_xmlSerializer"/><a href="/source/s?refs=_xmlSerializer" class="xfld intelliWindow-symbol" data-definition-place="def">_xmlSerializer</a>; 203<a class="l" name="197" href="#197">197</a><span class='fold-space'> </span> <b>private</b> <b>bool</b> <a class="xfld" name="_firstCall"/><a href="/source/s?refs=_firstCall" class="xfld intelliWindow-symbol" data-definition-place="def">_firstCall</a> = <b>true</b>; 204<a class="l" name="198" href="#198">198</a><span class='fold-space'> </span> } 205<a class="l" name="199" href="#199">199</a><span class='fold-space'> </span> 206<a class="hl" name="200" href="#200">200</a><span class='fold-space'> </span> 207<a class="l" name="201" href="#201">201</a><span class='fold-space'> </span> 208<a class="l" name="202" href="#202">202</a><span class='fold-space'> </span> <b>internal</b> 209<a class="l" name="203" href="#203">203</a><span class='fold-space'> </span> <b>class</b> <a class="xc" name="WrappedDeserializer"/><a href="/source/s?refs=WrappedDeserializer" class="xc intelliWindow-symbol" data-definition-place="def">WrappedDeserializer</a> : <a href="/source/s?defs=Serialization" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Serialization</a> 210<a class="l" name="204" href="#204">204</a><span class='fold-space'> </span> { 211<a class="l" name="205" href="#205">205</a><span class='fold-space'> </span> <b>internal</b> 212<span id='scope_id_961ba94d' class='scope-head'><span class='scope-signature'>WrappedDeserializer(DataFormat dataFormat, string streamName, TextReader input)</span><a class="l" name="206" href="#206">206</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_961ba94d_fold_icon'><span class='fold-icon'> </span></a> <a class="xmt" name="WrappedDeserializer"/><a href="/source/s?refs=WrappedDeserializer" class="xmt intelliWindow-symbol" data-definition-place="def">WrappedDeserializer</a>(<a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a> <a class="xa" name="dataFormat"/><a href="/source/s?refs=dataFormat" class="xa intelliWindow-symbol" data-definition-place="def">dataFormat</a>, <b>string</b> <a class="xa" name="streamName"/><a href="/source/s?refs=streamName" class="xa intelliWindow-symbol" data-definition-place="def">streamName</a>, <a href="/source/s?defs=TextReader" class="intelliWindow-symbol" data-definition-place="undefined-in-file">TextReader</a> <a class="xa" name="input"/><a href="/source/s?refs=input" class="xa intelliWindow-symbol" data-definition-place="def">input</a>)</span> 213<span id='scope_id_961ba94d_fold' class='scope-body'><a class="l" name="207" href="#207">207</a><span class='fold-space'> </span> : 214<a class="l" name="208" href="#208">208</a><span class='fold-space'> </span> <b>base</b>(<a href="/source/s?defs=dataFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">dataFormat</a>, <a href="/source/s?defs=streamName" class="intelliWindow-symbol" data-definition-place="undefined-in-file">streamName</a>) 215<a class="l" name="209" href="#209">209</a><span class='fold-space'> </span> { 216<a class="hl" name="210" href="#210">210</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#Dbg" data-definition-place="defined-in-file">Dbg</a>.<a href="/source/s?defs=Assert" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Assert</a>(<a class="d intelliWindow-symbol" href="#input" data-definition-place="defined-in-file">input</a> != <b>null</b>, <span class="s">"input should have a value"</span>); 217<a class="l" name="211" href="#211">211</a><span class='fold-space'> </span> 218<a class="l" name="212" href="#212">212</a><span class='fold-space'> </span> <span class="c">// If the data format is none - do nothing...</span> 219<a class="l" name="213" href="#213">213</a><span class='fold-space'> </span> <b>if</b> (<a href="/source/s?defs=dataFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">dataFormat</a> == <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#None" data-definition-place="defined-in-file">None</a>) 220<a class="l" name="214" href="#214">214</a><span class='fold-space'> </span> <b>return</b>; 221<a class="l" name="215" href="#215">215</a><span class='fold-space'> </span> 222<a class="l" name="216" href="#216">216</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#textReader" data-definition-place="defined-in-file">textReader</a> = <a class="d intelliWindow-symbol" href="#input" data-definition-place="defined-in-file">input</a>; 223<a class="l" name="217" href="#217">217</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_firstLine" data-definition-place="defined-in-file">_firstLine</a> = <a class="d intelliWindow-symbol" href="#textReader" data-definition-place="defined-in-file">textReader</a>.<a href="/source/s?defs=ReadLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ReadLine</a>(); 224<a class="l" name="218" href="#218">218</a><span class='fold-space'> </span> <b>if</b> (<a href="/source/s?defs=String" class="intelliWindow-symbol" data-definition-place="undefined-in-file">String</a>.<a href="/source/s?defs=Compare" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Compare</a>(<a class="d intelliWindow-symbol" href="#_firstLine" data-definition-place="defined-in-file">_firstLine</a>, <a href="/source/s?defs=Serialization" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Serialization</a>.<a class="d intelliWindow-symbol" href="#XmlCliTag" data-definition-place="defined-in-file">XmlCliTag</a>, <a href="/source/s?defs=StringComparison" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StringComparison</a>.<a href="/source/s?defs=OrdinalIgnoreCase" class="intelliWindow-symbol" data-definition-place="undefined-in-file">OrdinalIgnoreCase</a>) == <span class="n">0</span>) 225<a class="l" name="219" href="#219">219</a><span class='fold-space'> </span> { 226<a class="hl" name="220" href="#220">220</a><span class='fold-space'> </span> <span class="c">// format should be XML</span> 227<a class="l" name="221" href="#221">221</a><span class='fold-space'> </span> 228<a class="l" name="222" href="#222">222</a><span class='fold-space'> </span> <a href="/source/s?defs=dataFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">dataFormat</a> = <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#XML" data-definition-place="defined-in-file">XML</a>; 229<a class="l" name="223" href="#223">223</a><span class='fold-space'> </span> } 230<a class="l" name="224" href="#224">224</a><span class='fold-space'> </span> 231<a class="l" name="225" href="#225">225</a><span class='fold-space'> </span> <b>switch</b> (<a class="d intelliWindow-symbol" href="#format" data-definition-place="defined-in-file">format</a>) 232<a class="l" name="226" href="#226">226</a><span class='fold-space'> </span> { 233<a class="l" name="227" href="#227">227</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#XML" data-definition-place="defined-in-file">XML</a>: 234<a class="l" name="228" href="#228">228</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_xmlReader" data-definition-place="defined-in-file">_xmlReader</a> = <a href="/source/s?defs=XmlReader" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XmlReader</a>.<a href="/source/s?defs=Create" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Create</a>(<a class="d intelliWindow-symbol" href="#textReader" data-definition-place="defined-in-file">textReader</a>, <b>new</b> <a href="/source/s?defs=XmlReaderSettings" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XmlReaderSettings</a> { <a href="/source/s?defs=XmlResolver" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XmlResolver</a> = <b>null</b> }); 235<a class="l" name="229" href="#229">229</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_xmlDeserializer" data-definition-place="defined-in-file">_xmlDeserializer</a> = <b>new</b> <a href="/source/s?defs=Deserializer" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Deserializer</a>(<a class="d intelliWindow-symbol" href="#_xmlReader" data-definition-place="defined-in-file">_xmlReader</a>); 236<a class="hl" name="230" href="#230">230</a><span class='fold-space'> </span> <b>break</b>; 237<a class="l" name="231" href="#231">231</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#Text" data-definition-place="defined-in-file">Text</a>: 238<a class="l" name="232" href="#232">232</a><span class='fold-space'> </span> <b>default</b>: 239<a class="l" name="233" href="#233">233</a><span class='fold-space'> </span> <span class="c">// do nothing; we'll just read from the TextReader</span> 240<a class="l" name="234" href="#234">234</a><span class='fold-space'> </span> 241<a class="l" name="235" href="#235">235</a><span class='fold-space'> </span> <b>break</b>; 242<a class="l" name="236" href="#236">236</a><span class='fold-space'> </span> } 243<a class="l" name="237" href="#237">237</a><span class='fold-space'> </span> } 244</span><a class="l" name="238" href="#238">238</a><span class='fold-space'> </span> 245<a class="l" name="239" href="#239">239</a><span class='fold-space'> </span> 246<a class="hl" name="240" href="#240">240</a><span class='fold-space'> </span> 247<a class="l" name="241" href="#241">241</a><span class='fold-space'> </span> <b>internal</b> 248<a class="l" name="242" href="#242">242</a><span class='fold-space'> </span> <b>object</b> 249<span id='scope_id_6135420f' class='scope-head'><span class='scope-signature'>Deserialize()</span><a class="l" name="243" href="#243">243</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_6135420f_fold_icon'><span class='fold-icon'> </span></a> <a class="xmt" name="Deserialize"/><a href="/source/s?refs=Deserialize" class="xmt intelliWindow-symbol" data-definition-place="def">Deserialize</a>()</span> 250<span id='scope_id_6135420f_fold' class='scope-body'><a class="l" name="244" href="#244">244</a><span class='fold-space'> </span> { 251<a class="l" name="245" href="#245">245</a><span class='fold-space'> </span> <b>object</b> <a href="/source/s?defs=o" class="intelliWindow-symbol" data-definition-place="undefined-in-file">o</a>; 252<a class="l" name="246" href="#246">246</a><span class='fold-space'> </span> <b>switch</b> (<a class="d intelliWindow-symbol" href="#format" data-definition-place="defined-in-file">format</a>) 253<a class="l" name="247" href="#247">247</a><span class='fold-space'> </span> { 254<a class="l" name="248" href="#248">248</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#None" data-definition-place="defined-in-file">None</a>: 255<a class="l" name="249" href="#249">249</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_atEnd" data-definition-place="defined-in-file">_atEnd</a> = <b>true</b>; 256<a class="hl" name="250" href="#250">250</a><span class='fold-space'> </span> <b>return</b> <b>null</b>; 257<a class="l" name="251" href="#251">251</a><span class='fold-space'> </span> 258<a class="l" name="252" href="#252">252</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#XML" data-definition-place="defined-in-file">XML</a>: 259<a class="l" name="253" href="#253">253</a><span class='fold-space'> </span> <b>string</b> <a href="/source/s?defs=unused" class="intelliWindow-symbol" data-definition-place="undefined-in-file">unused</a>; 260<a class="l" name="254" href="#254">254</a><span class='fold-space'> </span> <a href="/source/s?defs=o" class="intelliWindow-symbol" data-definition-place="undefined-in-file">o</a> = <a class="d intelliWindow-symbol" href="#_xmlDeserializer" data-definition-place="defined-in-file">_xmlDeserializer</a>.<a class="d intelliWindow-symbol" href="#Deserialize" data-definition-place="defined-in-file">Deserialize</a>(<b>out</b> <a href="/source/s?defs=unused" class="intelliWindow-symbol" data-definition-place="undefined-in-file">unused</a>); 261<a class="l" name="255" href="#255">255</a><span class='fold-space'> </span> <b>break</b>; 262<a class="l" name="256" href="#256">256</a><span class='fold-space'> </span> 263<a class="l" name="257" href="#257">257</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#Text" data-definition-place="defined-in-file">Text</a>: 264<a class="l" name="258" href="#258">258</a><span class='fold-space'> </span> <b>default</b>: 265<a class="l" name="259" href="#259">259</a><span class='fold-space'> </span> <b>if</b> (<a class="d intelliWindow-symbol" href="#_atEnd" data-definition-place="defined-in-file">_atEnd</a>) 266<a class="hl" name="260" href="#260">260</a><span class='fold-space'> </span> { 267<a class="l" name="261" href="#261">261</a><span class='fold-space'> </span> <b>return</b> <b>null</b>; 268<a class="l" name="262" href="#262">262</a><span class='fold-space'> </span> } 269<a class="l" name="263" href="#263">263</a><span class='fold-space'> </span> <b>if</b> (<a class="d intelliWindow-symbol" href="#_firstLine" data-definition-place="defined-in-file">_firstLine</a> != <b>null</b>) 270<a class="l" name="264" href="#264">264</a><span class='fold-space'> </span> { 271<a class="l" name="265" href="#265">265</a><span class='fold-space'> </span> <a href="/source/s?defs=o" class="intelliWindow-symbol" data-definition-place="undefined-in-file">o</a> = <a class="d intelliWindow-symbol" href="#_firstLine" data-definition-place="defined-in-file">_firstLine</a>; 272<a class="l" name="266" href="#266">266</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_firstLine" data-definition-place="defined-in-file">_firstLine</a> = <b>null</b>; 273<a class="l" name="267" href="#267">267</a><span class='fold-space'> </span> } 274<a class="l" name="268" href="#268">268</a><span class='fold-space'> </span> <b>else</b> 275<a class="l" name="269" href="#269">269</a><span class='fold-space'> </span> { 276<a class="hl" name="270" href="#270">270</a><span class='fold-space'> </span> <a href="/source/s?defs=o" class="intelliWindow-symbol" data-definition-place="undefined-in-file">o</a> = <a class="d intelliWindow-symbol" href="#textReader" data-definition-place="defined-in-file">textReader</a>.<a href="/source/s?defs=ReadLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ReadLine</a>(); 277<a class="l" name="271" href="#271">271</a><span class='fold-space'> </span> <b>if</b> (<a href="/source/s?defs=o" class="intelliWindow-symbol" data-definition-place="undefined-in-file">o</a> == <b>null</b>) 278<a class="l" name="272" href="#272">272</a><span class='fold-space'> </span> { 279<a class="l" name="273" href="#273">273</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_atEnd" data-definition-place="defined-in-file">_atEnd</a> = <b>true</b>; 280<a class="l" name="274" href="#274">274</a><span class='fold-space'> </span> } 281<a class="l" name="275" href="#275">275</a><span class='fold-space'> </span> } 282<a class="l" name="276" href="#276">276</a><span class='fold-space'> </span> <b>break</b>; 283<a class="l" name="277" href="#277">277</a><span class='fold-space'> </span> } 284<a class="l" name="278" href="#278">278</a><span class='fold-space'> </span> <b>return</b> <a href="/source/s?defs=o" class="intelliWindow-symbol" data-definition-place="undefined-in-file">o</a>; 285<a class="l" name="279" href="#279">279</a><span class='fold-space'> </span> } 286</span><a class="hl" name="280" href="#280">280</a><span class='fold-space'> </span> 287<a class="l" name="281" href="#281">281</a><span class='fold-space'> </span> 288<a class="l" name="282" href="#282">282</a><span class='fold-space'> </span> 289<a class="l" name="283" href="#283">283</a><span class='fold-space'> </span> <b>internal</b> 290<a class="l" name="284" href="#284">284</a><span class='fold-space'> </span> <b>bool</b> 291<a class="l" name="285" href="#285">285</a><span class='fold-space'> </span> <a class="d" name="AtEnd"/><a href="/source/s?refs=AtEnd" class="d intelliWindow-symbol" data-definition-place="def">AtEnd</a> 292<a class="l" name="286" href="#286">286</a><span class='fold-space'> </span> { 293<a class="l" name="287" href="#287">287</a><span class='fold-space'> </span> <b>get</b> 294<a class="l" name="288" href="#288">288</a><span class='fold-space'> </span> { 295<a class="l" name="289" href="#289">289</a><span class='fold-space'> </span> <b>bool</b> <a href="/source/s?defs=result" class="intelliWindow-symbol" data-definition-place="undefined-in-file">result</a> = <b>false</b>; 296<a class="hl" name="290" href="#290">290</a><span class='fold-space'> </span> <b>switch</b> (<a class="d intelliWindow-symbol" href="#format" data-definition-place="defined-in-file">format</a>) 297<a class="l" name="291" href="#291">291</a><span class='fold-space'> </span> { 298<a class="l" name="292" href="#292">292</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#None" data-definition-place="defined-in-file">None</a>: 299<a class="l" name="293" href="#293">293</a><span class='fold-space'> </span> <a class="d intelliWindow-symbol" href="#_atEnd" data-definition-place="defined-in-file">_atEnd</a> = <b>true</b>; 300<a class="l" name="294" href="#294">294</a><span class='fold-space'> </span> <a href="/source/s?defs=result" class="intelliWindow-symbol" data-definition-place="undefined-in-file">result</a> = <b>true</b>; 301<a class="l" name="295" href="#295">295</a><span class='fold-space'> </span> <b>break</b>; 302<a class="l" name="296" href="#296">296</a><span class='fold-space'> </span> 303<a class="l" name="297" href="#297">297</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#XML" data-definition-place="defined-in-file">XML</a>: 304<a class="l" name="298" href="#298">298</a><span class='fold-space'> </span> <a href="/source/s?defs=result" class="intelliWindow-symbol" data-definition-place="undefined-in-file">result</a> = <a class="d intelliWindow-symbol" href="#_xmlDeserializer" data-definition-place="defined-in-file">_xmlDeserializer</a>.<a href="/source/s?defs=Done" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Done</a>(); 305<a class="l" name="299" href="#299">299</a><span class='fold-space'> </span> <b>break</b>; 306<a class="hl" name="300" href="#300">300</a><span class='fold-space'> </span> 307<a class="l" name="301" href="#301">301</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#Text" data-definition-place="defined-in-file">Text</a>: 308<a class="l" name="302" href="#302">302</a><span class='fold-space'> </span> <b>default</b>: 309<a class="l" name="303" href="#303">303</a><span class='fold-space'> </span> <a href="/source/s?defs=result" class="intelliWindow-symbol" data-definition-place="undefined-in-file">result</a> = <a class="d intelliWindow-symbol" href="#_atEnd" data-definition-place="defined-in-file">_atEnd</a>; 310<a class="l" name="304" href="#304">304</a><span class='fold-space'> </span> <b>break</b>; 311<a class="l" name="305" href="#305">305</a><span class='fold-space'> </span> } 312<a class="l" name="306" href="#306">306</a><span class='fold-space'> </span> <b>return</b> <a href="/source/s?defs=result" class="intelliWindow-symbol" data-definition-place="undefined-in-file">result</a>; 313<a class="l" name="307" href="#307">307</a><span class='fold-space'> </span> } 314<a class="l" name="308" href="#308">308</a><span class='fold-space'> </span> } 315<a class="l" name="309" href="#309">309</a><span class='fold-space'> </span> 316<a class="hl" name="310" href="#310">310</a><span class='fold-space'> </span> 317<a class="l" name="311" href="#311">311</a><span class='fold-space'> </span> 318<a class="l" name="312" href="#312">312</a><span class='fold-space'> </span> <b>internal</b> 319<a class="l" name="313" href="#313">313</a><span class='fold-space'> </span> <b>void</b> 320<span id='scope_id_2ea91b26' class='scope-head'><span class='scope-signature'>End()</span><a class="l" name="314" href="#314">314</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_2ea91b26_fold_icon'><span class='fold-icon'> </span></a> <a class="xmt" name="End"/><a href="/source/s?refs=End" class="xmt intelliWindow-symbol" data-definition-place="def">End</a>()</span> 321<span id='scope_id_2ea91b26_fold' class='scope-body'><a class="l" name="315" href="#315">315</a><span class='fold-space'> </span> { 322<a class="l" name="316" href="#316">316</a><span class='fold-space'> </span> <b>switch</b> (<a class="d intelliWindow-symbol" href="#format" data-definition-place="defined-in-file">format</a>) 323<a class="l" name="317" href="#317">317</a><span class='fold-space'> </span> { 324<a class="l" name="318" href="#318">318</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#None" data-definition-place="defined-in-file">None</a>: 325<a class="l" name="319" href="#319">319</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#XML" data-definition-place="defined-in-file">XML</a>: 326<a class="hl" name="320" href="#320">320</a><span class='fold-space'> </span> <b>case</b> <a class="d intelliWindow-symbol" href="#DataFormat" data-definition-place="defined-in-file">DataFormat</a>.<a class="d intelliWindow-symbol" href="#Text" data-definition-place="defined-in-file">Text</a>: 327<a class="l" name="321" href="#321">321</a><span class='fold-space'> </span> <b>default</b>: 328<a class="l" name="322" href="#322">322</a><span class='fold-space'> </span> <span class="c">// do nothing</span> 329<a class="l" name="323" href="#323">323</a><span class='fold-space'> </span> 330<a class="l" name="324" href="#324">324</a><span class='fold-space'> </span> <b>break</b>; 331<a class="l" name="325" href="#325">325</a><span class='fold-space'> </span> } 332<a class="l" name="326" href="#326">326</a><span class='fold-space'> </span> } 333</span><a class="l" name="327" href="#327">327</a><span class='fold-space'> </span> 334<a class="l" name="328" href="#328">328</a><span class='fold-space'> </span> 335<a class="l" name="329" href="#329">329</a><span class='fold-space'> </span> <b>internal</b> <a href="/source/s?defs=TextReader" class="intelliWindow-symbol" data-definition-place="undefined-in-file">TextReader</a> <a class="xfld" name="textReader"/><a href="/source/s?refs=textReader" class="xfld intelliWindow-symbol" data-definition-place="def">textReader</a>; 336<a class="hl" name="330" href="#330">330</a><span class='fold-space'> </span> <b>private</b> <a href="/source/s?defs=XmlReader" class="intelliWindow-symbol" data-definition-place="undefined-in-file">XmlReader</a> <a class="xfld" name="_xmlReader"/><a href="/source/s?refs=_xmlReader" class="xfld intelliWindow-symbol" data-definition-place="def">_xmlReader</a>; 337<a class="l" name="331" href="#331">331</a><span class='fold-space'> </span> <b>private</b> <a href="/source/s?defs=Deserializer" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Deserializer</a> <a class="xfld" name="_xmlDeserializer"/><a href="/source/s?refs=_xmlDeserializer" class="xfld intelliWindow-symbol" data-definition-place="def">_xmlDeserializer</a>; 338<a class="l" name="332" href="#332">332</a><span class='fold-space'> </span> <b>private</b> <b>string</b> <a class="xfld" name="_firstLine"/><a href="/source/s?refs=_firstLine" class="xfld intelliWindow-symbol" data-definition-place="def">_firstLine</a>; 339<a class="l" name="333" href="#333">333</a><span class='fold-space'> </span> <b>private</b> <b>bool</b> <a class="xfld" name="_atEnd"/><a href="/source/s?refs=_atEnd" class="xfld intelliWindow-symbol" data-definition-place="def">_atEnd</a>; 340<a class="l" name="334" href="#334">334</a><span class='fold-space'> </span> } 341<a class="l" name="335" href="#335">335</a><span class='fold-space'> </span>} <span class="c">// namespace</span> 342<a class="l" name="336" href="#336">336</a><span class='fold-space'> </span><span class="c">/*<a href="http://example.com">http://example.com</a>*/</span> 343<a class="l" name="337" href="#337">337</a><span class='fold-space'> </span></body> 344</html> 345