1 write to _writer
System.Private.Xml (1)
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (1)
38
_writer
= writer;
160 references to _writer
System.Private.Xml (160)
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (160)
50
internal IndentedWriter Writer { get { return
_writer
; } }
103
_writer
.Write(typeof(Hashtable).FullName);
104
_writer
.Write(" ");
105
_writer
.Write(privateName);
106
_writer
.WriteLine(" = null;");
107
_writer
.Write("public override ");
108
_writer
.Write(typeof(Hashtable).FullName);
110
_writer
.Write(" ");
111
_writer
.Write(publicName);
112
_writer
.WriteLine(" {");
113
_writer
.Indent++;
115
_writer
.WriteLine("get {");
116
_writer
.Indent++;
118
_writer
.Write("if (");
119
_writer
.Write(privateName);
120
_writer
.WriteLine(" == null) {");
121
_writer
.Indent++;
123
_writer
.Write(typeof(Hashtable).FullName);
124
_writer
.Write(" _tmp = new ");
125
_writer
.Write(typeof(Hashtable).FullName);
126
_writer
.WriteLine("();");
131
_writer
.Write("if (");
132
_writer
.Write(privateName);
133
_writer
.Write(" == null) ");
134
_writer
.Write(privateName);
135
_writer
.WriteLine(" = _tmp;");
136
_writer
.Indent--;
137
_writer
.WriteLine("}");
139
_writer
.Write("return ");
140
_writer
.Write(privateName);
141
_writer
.WriteLine(";");
142
_writer
.Indent--;
143
_writer
.WriteLine("}");
145
_writer
.Indent--;
146
_writer
.WriteLine("}");
157
_writer
.Write("_tmp[");
159
_writer
.Write("] = ");
161
_writer
.WriteLine(";");
169
_writer
.Write("public override ");
170
_writer
.Write(typeof(bool).FullName);
171
_writer
.Write(" CanSerialize(");
172
_writer
.Write(typeof(Type).FullName);
173
_writer
.WriteLine(" type) {");
174
_writer
.Indent++;
191
_writer
.Write("if (type == typeof(");
192
_writer
.Write(CodeIdentifier.GetCSharpName(type));
193
_writer
.WriteLine(")) return true;");
195
_writer
.WriteLine("return false;");
196
_writer
.Indent--;
197
_writer
.WriteLine("}");
205
_writer
.WriteLine();
206
_writer
.Write("public abstract class ");
207
_writer
.Write(CodeIdentifier.GetCSharpName(baseSerializer));
208
_writer
.Write(" : ");
209
_writer
.Write(typeof(System.Xml.Serialization.XmlSerializer).FullName);
210
_writer
.WriteLine(" {");
211
_writer
.Indent++;
213
_writer
.Write("protected override ");
214
_writer
.Write(typeof(System.Xml.Serialization.XmlSerializationReader).FullName);
215
_writer
.WriteLine(" CreateReader() {");
216
_writer
.Indent++;
217
_writer
.Write("return new ");
218
_writer
.Write(readerClass);
219
_writer
.WriteLine("();");
220
_writer
.Indent--;
221
_writer
.WriteLine("}");
223
_writer
.Write("protected override ");
224
_writer
.Write(typeof(System.Xml.Serialization.XmlSerializationWriter).FullName);
225
_writer
.WriteLine(" CreateWriter() {");
226
_writer
.Indent++;
227
_writer
.Write("return new ");
228
_writer
.Write(writerClass);
229
_writer
.WriteLine("();");
230
_writer
.Indent--;
231
_writer
.WriteLine("}");
233
_writer
.Indent--;
234
_writer
.WriteLine("}");
244
_writer
.WriteLine();
245
_writer
.Write("public sealed class ");
246
_writer
.Write(CodeIdentifier.GetCSharpName(serializerName));
247
_writer
.Write(" : ");
248
_writer
.Write(baseSerializer);
249
_writer
.WriteLine(" {");
250
_writer
.Indent++;
252
_writer
.WriteLine();
253
_writer
.Write("public override ");
254
_writer
.Write(typeof(bool).FullName);
255
_writer
.Write(" CanDeserialize(");
256
_writer
.Write(typeof(XmlReader).FullName);
257
_writer
.WriteLine(" xmlReader) {");
258
_writer
.Indent++;
262
_writer
.WriteLine("return true;");
266
_writer
.Write("return xmlReader.IsStartElement(");
268
_writer
.Write(", ");
270
_writer
.WriteLine(");");
272
_writer
.Indent--;
273
_writer
.WriteLine("}");
277
_writer
.WriteLine();
278
_writer
.Write("protected override void Serialize(object objectToSerialize, ");
279
_writer
.Write(typeof(System.Xml.Serialization.XmlSerializationWriter).FullName);
280
_writer
.WriteLine(" writer) {");
281
_writer
.Indent++;
282
_writer
.Write("((");
283
_writer
.Write(writerClass);
284
_writer
.Write(")writer).");
285
_writer
.Write(writeMethod);
286
_writer
.Write("(");
289
_writer
.Write("(object[])");
291
_writer
.WriteLine("objectToSerialize);");
292
_writer
.Indent--;
293
_writer
.WriteLine("}");
297
_writer
.WriteLine();
298
_writer
.Write("protected override object Deserialize(");
299
_writer
.Write(typeof(System.Xml.Serialization.XmlSerializationReader).FullName);
300
_writer
.WriteLine(" reader) {");
301
_writer
.Indent++;
302
_writer
.Write("return ((");
303
_writer
.Write(readerClass);
304
_writer
.Write(")reader).");
305
_writer
.Write(readMethod);
306
_writer
.WriteLine("();");
307
_writer
.Indent--;
308
_writer
.WriteLine("}");
310
_writer
.Indent--;
311
_writer
.WriteLine("}");
323
_writer
.Write("_tmp.Add(");
325
_writer
.Write(", new ");
326
_writer
.Write((string?)serializers[key]);
327
_writer
.WriteLine("());");
335
_writer
.Write("public override ");
336
_writer
.Write(typeof(System.Xml.Serialization.XmlSerializer).FullName);
337
_writer
.Write(" GetSerializer(");
338
_writer
.Write(typeof(Type).FullName);
339
_writer
.WriteLine(" type) {");
340
_writer
.Indent++;
355
_writer
.Write("if (type == typeof(");
356
_writer
.Write(CodeIdentifier.GetCSharpName(type));
357
_writer
.Write(")) return new ");
358
_writer
.Write((string?)serializers[xmlMappings[i].Key!]);
359
_writer
.WriteLine("();");
362
_writer
.WriteLine("return null;");
363
_writer
.Indent--;
364
_writer
.WriteLine("}");
369
_writer
.WriteLine();
370
_writer
.Write("public class XmlSerializerContract : global::");
371
_writer
.Write(typeof(System.Xml.Serialization.XmlSerializerImplementation).FullName);
372
_writer
.WriteLine(" {");
373
_writer
.Indent++;
375
_writer
.Write("public override global::");
376
_writer
.Write(typeof(System.Xml.Serialization.XmlSerializationReader).FullName);
377
_writer
.Write(" Reader { get { return new ");
378
_writer
.Write(readerType);
379
_writer
.WriteLine("(); } }");
381
_writer
.Write("public override global::");
382
_writer
.Write(typeof(System.Xml.Serialization.XmlSerializationWriter).FullName);
383
_writer
.Write(" Writer { get { return new ");
384
_writer
.Write(writerType);
385
_writer
.WriteLine("(); } }");
393
_writer
.Indent--;
394
_writer
.WriteLine("}");