|
16 | 16 | <a class="l" name="8" href="#8">8</a><span class='fold-space'> </span>MIT License
|
17 | 17 | <a class="l" name="9" href="#9">9</a><span class='fold-space'> </span>
|
18 | 18 | <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
|
19 |
| -<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 |
| 19 | +<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 |
20 | 20 | <a class="l" name="12" href="#12">12</a><span class='fold-space'> </span>in the Software without restriction, including without limitation the rights
|
21 | 21 | <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
|
22 | 22 | <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
|
|
52 | 52 | <a class="l" name="44" href="#44">44</a><span class='fold-space'> </span>{
|
53 | 53 | <a class="l" name="45" href="#45">45</a><span class='fold-space'> </span> <span class="c">/// <summary></span>
|
54 | 54 | <a class="l" name="46" href="#46">46</a><span class='fold-space'> </span> <span class="c">///</span>
|
55 |
| -<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> |
| 55 | +<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> |
56 | 56 | <a class="l" name="48" href="#48">48</a><span class='fold-space'> </span> <span class="c">/// format.</span>
|
57 | 57 | <a class="l" name="49" href="#49">49</a><span class='fold-space'> </span> <span class="c">///</span>
|
58 | 58 | <a class="hl" name="50" href="#50">50</a><span class='fold-space'> </span> <span class="c">/// </summary></span>
|
|
97 | 97 | <a class="l" name="89" href="#89">89</a><span class='fold-space'> </span> <b>protected</b>
|
98 | 98 | <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>
|
99 | 99 | <span id='scope_id_1140b754_fold' class='scope-body'><a class="l" name="91" href="#91">91</a><span class='fold-space'> </span> {
|
100 |
| -<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>); |
| 100 | +<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>); |
101 | 101 | <a class="l" name="93" href="#93">93</a><span class='fold-space'> </span>
|
102 | 102 | <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>;
|
103 | 103 | <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>;
|
104 | 104 | <a class="l" name="96" href="#96">96</a><span class='fold-space'> </span> }
|
105 | 105 | </span><a class="l" name="97" href="#97">97</a><span class='fold-space'> </span>
|
106 | 106 | <a class="l" name="98" href="#98">98</a><span class='fold-space'> </span>
|
107 | 107 | <a class="l" name="99" href="#99">99</a><span class='fold-space'> </span>
|
108 |
| -<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>; |
| 108 | +<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>; |
109 | 109 | <a class="l" name="101" href="#101">101</a><span class='fold-space'> </span>
|
110 | 110 | <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>;
|
111 | 111 | <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>;
|
|
121 | 121 | <span id='scope_id_51521845_fold' class='scope-body'><a class="l" name="113" href="#113">113</a><span class='fold-space'> </span> :
|
122 | 122 | <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>)
|
123 | 123 | <a class="l" name="115" href="#115">115</a><span class='fold-space'> </span> {
|
124 |
| -<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>); |
| 124 | +<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>); |
125 | 125 | <a class="l" name="117" href="#117">117</a><span class='fold-space'> </span>
|
126 | 126 | <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>;
|
127 | 127 | <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>)
|
|
135 | 135 | <a class="l" name="127" href="#127">127</a><span class='fold-space'> </span> <b>break</b>;
|
136 | 136 | <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>:
|
137 | 137 | <a class="l" name="129" href="#129">129</a><span class='fold-space'> </span> <b>default</b>:
|
138 |
| -<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> |
| 138 | +<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> |
139 | 139 | <a class="l" name="131" href="#131">131</a><span class='fold-space'> </span> <span class="c">// or discard it.</span>
|
140 | 140 | <a class="l" name="132" href="#132">132</a><span class='fold-space'> </span>
|
141 | 141 | <a class="l" name="133" href="#133">133</a><span class='fold-space'> </span> <b>break</b>;
|
|
215 | 215 | <span id='scope_id_961ba94d_fold' class='scope-body'><a class="l" name="207" href="#207">207</a><span class='fold-space'> </span> :
|
216 | 216 | <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>)
|
217 | 217 | <a class="l" name="209" href="#209">209</a><span class='fold-space'> </span> {
|
218 |
| -<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>); |
| 218 | +<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>); |
219 | 219 | <a class="l" name="211" href="#211">211</a><span class='fold-space'> </span>
|
220 | 220 | <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>
|
221 | 221 | <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>)
|
|
238 | 238 | <a class="hl" name="230" href="#230">230</a><span class='fold-space'> </span> <b>break</b>;
|
239 | 239 | <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>:
|
240 | 240 | <a class="l" name="232" href="#232">232</a><span class='fold-space'> </span> <b>default</b>:
|
241 |
| -<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> |
| 241 | +<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> |
242 | 242 | <a class="l" name="234" href="#234">234</a><span class='fold-space'> </span>
|
243 | 243 | <a class="l" name="235" href="#235">235</a><span class='fold-space'> </span> <b>break</b>;
|
244 | 244 | <a class="l" name="236" href="#236">236</a><span class='fold-space'> </span> }
|
|
0 commit comments