1016 references to Write
System.Private.Xml (1016)
System\Xml\Serialization\Compilation.cs (6)
355
writer.
Write
("[assembly:");
356
writer.
Write
(typeof(XmlSerializerVersionAttribute).FullName);
357
writer.
Write
("(");
358
writer.
Write
("ParentAssemblyId=");
360
writer.
Write
(", Version=");
364
writer.
Write
(", Namespace=");
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (83)
103
_writer.
Write
(typeof(Hashtable).FullName);
104
_writer.
Write
(" ");
105
_writer.
Write
(privateName);
107
_writer.
Write
("public override ");
108
_writer.
Write
(typeof(Hashtable).FullName);
110
_writer.
Write
(" ");
111
_writer.
Write
(publicName);
118
_writer.
Write
("if (");
119
_writer.
Write
(privateName);
123
_writer.
Write
(typeof(Hashtable).FullName);
124
_writer.
Write
(" _tmp = new ");
125
_writer.
Write
(typeof(Hashtable).FullName);
131
_writer.
Write
("if (");
132
_writer.
Write
(privateName);
133
_writer.
Write
(" == null) ");
134
_writer.
Write
(privateName);
139
_writer.
Write
("return ");
140
_writer.
Write
(privateName);
157
_writer.
Write
("_tmp[");
159
_writer.
Write
("] = ");
169
_writer.
Write
("public override ");
170
_writer.
Write
(typeof(bool).FullName);
171
_writer.
Write
(" CanSerialize(");
172
_writer.
Write
(typeof(Type).FullName);
191
_writer.
Write
("if (type == typeof(");
192
_writer.
Write
(CodeIdentifier.GetCSharpName(type));
206
_writer.
Write
("public abstract class ");
207
_writer.
Write
(CodeIdentifier.GetCSharpName(baseSerializer));
208
_writer.
Write
(" : ");
209
_writer.
Write
(typeof(System.Xml.Serialization.XmlSerializer).FullName);
213
_writer.
Write
("protected override ");
214
_writer.
Write
(typeof(System.Xml.Serialization.XmlSerializationReader).FullName);
217
_writer.
Write
("return new ");
218
_writer.
Write
(readerClass);
223
_writer.
Write
("protected override ");
224
_writer.
Write
(typeof(System.Xml.Serialization.XmlSerializationWriter).FullName);
227
_writer.
Write
("return new ");
228
_writer.
Write
(writerClass);
245
_writer.
Write
("public sealed class ");
246
_writer.
Write
(CodeIdentifier.GetCSharpName(serializerName));
247
_writer.
Write
(" : ");
248
_writer.
Write
(baseSerializer);
253
_writer.
Write
("public override ");
254
_writer.
Write
(typeof(bool).FullName);
255
_writer.
Write
(" CanDeserialize(");
256
_writer.
Write
(typeof(XmlReader).FullName);
266
_writer.
Write
("return xmlReader.IsStartElement(");
268
_writer.
Write
(", ");
278
_writer.
Write
("protected override void Serialize(object objectToSerialize, ");
279
_writer.
Write
(typeof(System.Xml.Serialization.XmlSerializationWriter).FullName);
282
_writer.
Write
("((");
283
_writer.
Write
(writerClass);
284
_writer.
Write
(")writer).");
285
_writer.
Write
(writeMethod);
286
_writer.
Write
("(");
289
_writer.
Write
("(object[])");
298
_writer.
Write
("protected override object Deserialize(");
299
_writer.
Write
(typeof(System.Xml.Serialization.XmlSerializationReader).FullName);
302
_writer.
Write
("return ((");
303
_writer.
Write
(readerClass);
304
_writer.
Write
(")reader).");
305
_writer.
Write
(readMethod);
323
_writer.
Write
("_tmp.Add(");
325
_writer.
Write
(", new ");
326
_writer.
Write
((string?)serializers[key]);
335
_writer.
Write
("public override ");
336
_writer.
Write
(typeof(System.Xml.Serialization.XmlSerializer).FullName);
337
_writer.
Write
(" GetSerializer(");
338
_writer.
Write
(typeof(Type).FullName);
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!]);
370
_writer.
Write
("public class XmlSerializerContract : global::");
371
_writer.
Write
(typeof(System.Xml.Serialization.XmlSerializerImplementation).FullName);
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);
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);
System\Xml\Serialization\XmlSerializationReader.cs (447)
2233
Writer.
Write
(Access);
2234
Writer.
Write
(" class ");
2235
Writer.
Write
(ClassName);
2236
Writer.
Write
(" : ");
2237
Writer.
Write
(typeof(System.Xml.Serialization.XmlSerializationReader).FullName);
2303
Writer.
Write
("string ");
2304
Writer.
Write
(idName);
2315
Writer.
Write
(idName);
2316
Writer.
Write
(" = Reader.NameTable.Add(");
2343
Writer.
Write
("if (Reader.IsStartElement(");
2345
Writer.
Write
(", ");
2358
Writer.
Write
(func);
2359
Writer.
Write
("(");
2360
Writer.
Write
(node);
2363
Writer.
Write
(", ");
2402
Writer.
Write
("AddReadCallback(");
2404
Writer.
Write
(", ");
2406
Writer.
Write
(", ");
2407
Writer.
Write
(RaCodeGen.GetStringForTypeof(mapping.TypeDesc.CSharpName, mapping.TypeDesc.UseReflection));
2408
Writer.
Write
(", new ");
2409
Writer.
Write
(typeof(XmlSerializationReadCallback).FullName);
2410
Writer.
Write
("(this.");
2411
Writer.
Write
(methodName);
2423
Writer.
Write
("object ");
2424
Writer.
Write
(dummyArrayMethodName);
2480
Writer.
Write
("public object[] ");
2481
Writer.
Write
(methodName);
2486
Writer.
Write
("object[] p = new object[");
2487
Writer.
Write
(mappings.Length.ToString(CultureInfo.InvariantCulture));
2633
Writer.
Write
(arrayName);
2634
Writer.
Write
("[");
2635
Writer.
Write
(i.ToString(CultureInfo.InvariantCulture));
2636
Writer.
Write
("] = ");
2640
Writer.
Write
("null");
2644
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(mappings[i].TypeDesc!.CSharpName, mappings[i].TypeDesc!.UseReflection, false, false));
2659
Writer.
Write
("public object[] ");
2660
Writer.
Write
(methodName);
2666
Writer.
Write
("object[] p = new object[");
2667
Writer.
Write
(mappings.Length.ToString(CultureInfo.InvariantCulture));
2677
Writer.
Write
("if (!");
2760
Writer.
Write
(item);
2761
Writer.
Write
(" ");
2762
Writer.
Write
("ci =");
2763
Writer.
Write
($"({item})");
2764
Writer.
Write
(source);
2769
Writer.
Write
(RaCodeGen.GetStringForMethod("c", td.CSharpName, "Add", useReflection));
2774
Writer.
Write
("ci[i]");
2776
Writer.
Write
($"{RaCodeGen.GetReflectionVariable(typeof(Array).FullName!, "0")}[ci , i]");
2791
Writer.
Write
("public object ");
2792
Writer.
Write
(methodName);
2830
Writer.
Write
("(");
2831
Writer.
Write
(mapping.TypeDesc!.CSharpName);
2832
Writer.
Write
(")");
2834
Writer.
Write
(enumMethodName);
2835
Writer.
Write
("(");
2836
if (!mapping.IsSoap) Writer.
Write
(source);
2837
Writer.
Write
(")");
2841
Writer.
Write
(source);
2847
Writer.
Write
("CollapseWhitespace(");
2848
Writer.
Write
(source);
2849
Writer.
Write
(")");
2853
Writer.
Write
(source);
2860
Writer.
Write
(typeof(XmlConvert).FullName);
2861
Writer.
Write
(".");
2863
Writer.
Write
("To");
2864
Writer.
Write
(mapping.TypeDesc.FormatterName);
2865
Writer.
Write
("(");
2866
Writer.
Write
(source);
2867
Writer.
Write
(")");
2903
Writer.
Write
(typeof(Hashtable).FullName);
2904
Writer.
Write
(" ");
2905
Writer.
Write
(memberName);
2909
Writer.
Write
("internal ");
2910
Writer.
Write
(typeof(Hashtable).FullName);
2911
Writer.
Write
(" ");
2912
Writer.
Write
(propName);
2919
Writer.
Write
("if ((object)");
2920
Writer.
Write
(memberName);
2924
Writer.
Write
(typeof(Hashtable).FullName);
2925
Writer.
Write
(" h = new ");
2926
Writer.
Write
(typeof(Hashtable).FullName);
2933
Writer.
Write
("h.Add(");
2937
Writer.
Write
(", (long)");
2938
Writer.
Write
(mapping.TypeDesc.CSharpName);
2939
Writer.
Write
(".@");
2941
Writer.
Write
(constants[i].Name);
2945
Writer.
Write
(", ");
2946
Writer.
Write
(string.Create(CultureInfo.InvariantCulture, $"{constants[i].Value}L"));
2952
Writer.
Write
(memberName);
2958
Writer.
Write
("return ");
2959
Writer.
Write
(memberName);
2984
Writer.
Write
("object");
2985
Writer.
Write
(" ");
2986
Writer.
Write
(methodName);
2993
Writer.
Write
(useReflection ? "object" : fullTypeName);
2994
Writer.
Write
(" ");
2995
Writer.
Write
(methodName);
3005
Writer.
Write
("return ");
3006
Writer.
Write
(typeof(Enum).FullName);
3007
Writer.
Write
(".ToObject(");
3008
Writer.
Write
(RaCodeGen.GetStringForTypeof(fullTypeName, useReflection));
3009
Writer.
Write
(", ToEnum(s, ");
3010
Writer.
Write
(tableName);
3011
Writer.
Write
(", ");
3017
Writer.
Write
("return (");
3018
Writer.
Write
(fullTypeName);
3019
Writer.
Write
(")ToEnum(s, ");
3020
Writer.
Write
(tableName);
3021
Writer.
Write
(", ");
3038
Writer.
Write
("case ");
3040
Writer.
Write
(": return ");
3041
Writer.
Write
(RaCodeGen.GetStringForEnumMember(fullTypeName, c.Name, useReflection));
3047
Writer.
Write
("default: throw CreateUnknownConstantException(s, ");
3048
Writer.
Write
(RaCodeGen.GetStringForTypeof(fullTypeName, useReflection));
3062
Writer.
Write
("if (");
3073
Writer.
Write
("return ");
3075
Writer.
Write
($"({returnTypeName})");
3076
Writer.
Write
(methodName);
3077
Writer.
Write
("(");
3079
Writer.
Write
("isNullable, ");
3099
Writer.
Write
("if (");
3109
Writer.
Write
("object e = ");
3110
Writer.
Write
(methodName);
3121
Writer.
Write
("if (");
3135
Writer.
Write
(typeof(Array).FullName);
3137
Writer.
Write
("object");
3140
Writer.
Write
(fullTypeName);
3141
Writer.
Write
(" a = ");
3144
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(fullTypeName, td.UseReflection, false, false));
3167
Writer.
Write
(typeName);
3168
Writer.
Write
(" ");
3169
Writer.
Write
(methodName);
3173
Writer.
Write
(typeName);
3174
Writer.
Write
(" o = ");
3178
Writer.
Write
("null");
3182
Writer.
Write
("default(");
3183
Writer.
Write
(typeName);
3184
Writer.
Write
(")");
3220
Writer.
Write
(typeName);
3221
Writer.
Write
(" ");
3222
Writer.
Write
(methodName);
3223
Writer.
Write
("(");
3225
Writer.
Write
("bool isNullable, ");
3229
Writer.
Write
(typeof(XmlQualifiedName).FullName);
3242
Writer.
Write
("else return ");
3245
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(structMapping.TypeDesc.CSharpName, useReflection, false, false));
3254
Writer.
Write
("if (xsiType == null");
3257
Writer.
Write
(" || ");
3273
Writer.
Write
("return ReadTypedPrimitive((");
3275
Writer.
Write
("throw CreateUnknownTypeException((");
3276
Writer.
Write
(typeof(XmlQualifiedName).FullName);
3288
Writer.
Write
("throw CreateAbstractTypeException(");
3290
Writer.
Write
(", ");
3425
Writer.
Write
("object");
3426
Writer.
Write
(" ");
3427
Writer.
Write
(methodName);
3428
Writer.
Write
("(");
3438
Writer.
Write
("throw CreateAbstractTypeException(");
3440
Writer.
Write
(", ");
3498
Writer.
Write
("void ");
3499
Writer.
Write
(fixupMethodName);
3512
Writer.
Write
("if (ids[");
3513
Writer.
Write
(fixupIndex);
3536
Writer.
Write
(targetSource);
3542
Writer.
Write
(member.CheckSpecifiedSource);
3570
Writer.
Write
("if ((object)(");
3571
Writer.
Write
(memberSource);
3577
Writer.
Write
("throw CreateReadOnlyCollectionException(");
3583
Writer.
Write
(memberSource);
3584
Writer.
Write
(" = ");
3585
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(typeDesc.CSharpName, typeDesc.UseReflection, typeDesc.CannotNew, true));
3592
Writer.
Write
("CollectionFixup collectionFixup = new CollectionFixup(");
3593
Writer.
Write
(memberSource);
3594
Writer.
Write
(", ");
3595
Writer.
Write
("new ");
3596
Writer.
Write
(typeof(XmlSerializationCollectionFixupCallback).FullName);
3597
Writer.
Write
("(this.");
3598
Writer.
Write
(create.Name);
3599
Writer.
Write
("), ");
3600
Writer.
Write
(targetSource);
3607
Writer.
Write
("void ");
3608
Writer.
Write
(c.Name);
3628
Writer.
Write
("((object) ((");
3629
Writer.
Write
(typeof(XmlQualifiedName).FullName);
3630
Writer.
Write
(")");
3631
Writer.
Write
(source);
3632
Writer.
Write
(").Name == (object)");
3634
Writer.
Write
(" && (object) ((");
3635
Writer.
Write
(typeof(XmlQualifiedName).FullName);
3636
Writer.
Write
(")");
3637
Writer.
Write
(source);
3638
Writer.
Write
(").Namespace == (object)");
3640
Writer.
Write
(")");
3645
Writer.
Write
("(");
3648
Writer.
Write
("(object) ");
3649
Writer.
Write
(source);
3650
Writer.
Write
(".LocalName == (object)");
3652
Writer.
Write
(" && ");
3654
Writer.
Write
("(object) ");
3655
Writer.
Write
(source);
3656
Writer.
Write
(".NamespaceURI == (object)");
3658
Writer.
Write
(")");
3670
Writer.
Write
(idName);
3700
Writer.
Write
("else ");
3702
Writer.
Write
("if (");
3705
Writer.
Write
("!");
3706
Writer.
Write
(member.ParamsReadSource);
3707
Writer.
Write
(" && ");
3725
Writer.
Write
("else ");
3732
Writer.
Write
("if (");
3733
Writer.
Write
(xmlnsMember.Source);
3734
Writer.
Write
(" == null) ");
3735
Writer.
Write
(xmlnsMember.Source);
3736
Writer.
Write
(" = new ");
3737
Writer.
Write
(xmlnsMember.Mapping.TypeDesc!.CSharpName);
3741
Writer.
Write
($"(({xmlnsMember.Mapping.TypeDesc.CSharpName}){xmlnsMember.ArraySource})");
3757
Writer.
Write
(typeof(XmlAttribute).FullName);
3758
Writer.
Write
(" attr = ");
3759
Writer.
Write
("(");
3760
Writer.
Write
(typeof(XmlAttribute).FullName);
3767
Writer.
Write
(elseCall);
3768
Writer.
Write
("(");
3769
Writer.
Write
(firstParam);
3772
Writer.
Write
(", ");
3802
Writer.
Write
("attr");
3808
Writer.
Write
("if (attr is ");
3809
Writer.
Write
(typeof(XmlAttribute).FullName);
3813
Writer.
Write
("(");
3814
Writer.
Write
(typeof(XmlAttribute).FullName);
3815
Writer.
Write
(")attr");
3852
Writer.
Write
(member.CheckSpecifiedSource);
3857
Writer.
Write
(member.ParamsReadSource);
3881
Writer.
Write
("Fixup fixup = new Fixup(");
3882
Writer.
Write
(source);
3883
Writer.
Write
(", ");
3884
Writer.
Write
("new ");
3885
Writer.
Write
(typeof(XmlSerializationFixupCallback).FullName);
3886
Writer.
Write
("(this.");
3887
Writer.
Write
(fixupMethodName);
3888
Writer.
Write
("), ");
3889
Writer.
Write
(fixupCount.ToString(CultureInfo.InvariantCulture));
3915
Writer.
Write
("int ");
3916
Writer.
Write
(c);
3924
Writer.
Write
("int c");
3925
Writer.
Write
(member.ChoiceArrayName);
3935
Writer.
Write
(member.Source);
3936
Writer.
Write
(a);
3947
Writer.
Write
("if ((object)(");
3948
Writer.
Write
(member.Source);
3949
Writer.
Write
(") == null) ");
3952
Writer.
Write
("throw CreateReadOnlyCollectionException(");
3958
Writer.
Write
(member.Source);
3959
Writer.
Write
(" = ");
3960
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(typeDescFullName, useReflection, typeDesc.CannotNew, true));
4015
Writer.
Write
("if (Reader.NodeType == ");
4016
Writer.
Write
(typeof(XmlNodeType).FullName);
4045
Writer.
Write
("else if (Reader.NodeType == ");
4046
Writer.
Write
(typeof(XmlNodeType).FullName);
4048
Writer.
Write
("Reader.NodeType == ");
4049
Writer.
Write
(typeof(XmlNodeType).FullName);
4051
Writer.
Write
("Reader.NodeType == ");
4052
Writer.
Write
(typeof(XmlNodeType).FullName);
4054
Writer.
Write
("Reader.NodeType == ");
4055
Writer.
Write
(typeof(XmlNodeType).FullName);
4065
Writer.
Write
(elseString);
4082
Writer.
Write
("Document.CreateTextNode(Reader.ReadString())");
4096
Writer.
Write
("CollapseWhitespace(Reader.ReadString())");
4100
Writer.
Write
("Reader.ReadString()");
4107
Writer.
Write
("tmp = ReadString(tmp, ");
4114
Writer.
Write
("tmp");
4135
Writer.
Write
(checkTypeHrefsSource);
4137
Writer.
Write
(checkTypeHrefsSource);
4143
Writer.
Write
(checkTypeHrefsSource);
4145
Writer.
Write
(checkTypeHrefsSource);
4225
Writer.
Write
("else ");
4229
Writer.
Write
("case ");
4230
Writer.
Write
(cases.ToString(CultureInfo.InvariantCulture));
4237
Writer.
Write
("if (");
4240
Writer.
Write
("!");
4241
Writer.
Write
(member.ParamsReadSource);
4242
Writer.
Write
(" && ");
4249
Writer.
Write
(RaCodeGen.GetStringForTypeof(td.CSharpName, td.UseReflection));
4253
Writer.
Write
(RaCodeGen.GetStringForTypeof(e.Mapping!.TypeDesc!.CSharpName, e.Mapping.TypeDesc.UseReflection));
4255
Writer.
Write
(".IsAssignableFrom(");
4256
Writer.
Write
(checkTypeSource);
4257
Writer.
Write
("Type)");
4262
Writer.
Write
("(IsReturnValue || ");
4265
Writer.
Write
("true");
4272
Writer.
Write
(")");
4280
Writer.
Write
("if (");
4281
Writer.
Write
(checkTypeSource);
4289
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(e.Mapping.TypeDesc.CSharpName, e.Mapping.TypeDesc.UseReflection, false, true, $"({td.CSharpName}){checkTypeSource}"));
4294
Writer.
Write
(checkTypeSource);
4305
Writer.
Write
("fixup.Ids[");
4306
Writer.
Write
(member.FixupIndex.ToString(CultureInfo.InvariantCulture));
4307
Writer.
Write
("] = ");
4308
Writer.
Write
(checkTypeSource);
4320
Writer.
Write
(member.ParamsReadSource);
4338
Writer.
Write
("state = ");
4339
Writer.
Write
(cases.ToString(CultureInfo.InvariantCulture));
4433
Writer.
Write
(" soap[1] = ");
4441
Writer.
Write
($"({arrayTypeFullName}[])");
4442
Writer.
Write
("ShrinkArray(");
4443
Writer.
Write
(a);
4444
Writer.
Write
(", ");
4445
Writer.
Write
(c);
4446
Writer.
Write
(", ");
4447
Writer.
Write
(RaCodeGen.GetStringForTypeof(arrayTypeFullName, arrayUseReflection));
4448
Writer.
Write
(", ");
4450
Writer.
Write
(")");
4463
Writer.
Write
($"({choiceTypeName}[])");
4464
Writer.
Write
("ShrinkArray(");
4465
Writer.
Write
(a);
4466
Writer.
Write
(", ");
4467
Writer.
Write
(c);
4468
Writer.
Write
(", ");
4469
Writer.
Write
(RaCodeGen.GetStringForTypeof(choiceTypeName, choiceUseReflection));
4470
Writer.
Write
(", ");
4472
Writer.
Write
(")");
4479
Writer.
Write
(member.Source);
4480
Writer.
Write
(" = ");
4481
Writer.
Write
(member.ArrayName);
4493
Writer.
Write
("(");
4494
Writer.
Write
(typeDesc.CSharpName);
4495
Writer.
Write
(")");
4501
Writer.
Write
(source);
4503
Writer.
Write
(" = ");
4511
Writer.
Write
(")");
4513
Writer.
Write
("})");
4520
Writer.
Write
("object rre = ");
4521
Writer.
Write
(fixupIndex >= 0 ? "ReadReferencingElement" : "ReadReferencedElement");
4522
Writer.
Write
("(");
4524
Writer.
Write
(", ");
4528
Writer.
Write
(", ");
4529
Writer.
Write
("out fixup.Ids[");
4530
Writer.
Write
((fixupIndex).ToString(CultureInfo.InvariantCulture));
4531
Writer.
Write
("]");
4549
Writer.
Write
("rre");
4572
Writer.
Write
("if (((object)(");
4573
Writer.
Write
(member.ArrayName);
4574
Writer.
Write
(") == null) || ");
4578
Writer.
Write
("if (");
4622
Writer.
Write
(checkSpecified);
4638
Writer.
Write
(methodName);
4639
Writer.
Write
("(true)");
4652
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(element.Mapping.TypeDesc.CSharpName, element.Mapping.TypeDesc.UseReflection, false, false));
4656
Writer.
Write
("null");
4662
Writer.
Write
("else ");
4687
Writer.
Write
("default(System.TimeSpan)");
4691
Writer.
Write
("default(System.DateTimeOffset)");
4710
Writer.
Write
("ReadElementQualifiedName()");
4738
Writer.
Write
("object rre = ");
4739
Writer.
Write
(fixupIndex >= 0 ? "ReadReferencingElement" : "ReadReferencedElement");
4740
Writer.
Write
("(");
4742
Writer.
Write
(", ");
4747
Writer.
Write
(", out fixup.Ids[");
4748
Writer.
Write
((fixupIndex).ToString(CultureInfo.InvariantCulture));
4749
Writer.
Write
("]");
4751
Writer.
Write
(")");
4764
Writer.
Write
("rre");
4768
Writer.
Write
("Referenced(");
4769
Writer.
Write
(source);
4787
Writer.
Write
("if ((object)(");
4788
Writer.
Write
(arrayName);
4789
Writer.
Write
(") == null) Reader.Skip(); else ");
4792
Writer.
Write
(methodName);
4793
Writer.
Write
("(");
4797
Writer.
Write
(", ");
4799
Writer.
Write
("true");
4800
Writer.
Write
(")");
4812
Writer.
Write
(isDoc ? "ReadXmlDocument(" : "ReadXmlNode(");
4813
Writer.
Write
(element.Any ? "false" : "true");
4814
Writer.
Write
(")");
4823
Writer.
Write
(typeof(XmlQualifiedName).FullName);
4825
Writer.
Write
("if (tser == null");
4826
Writer.
Write
(" || ");
4833
Writer.
Write
("ReadSerializable(( ");
4834
Writer.
Write
(typeof(IXmlSerializable).FullName);
4835
Writer.
Write
(")");
4838
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(sm.TypeDesc!.CSharpName, false, false, false, "\"default\""));
4842
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(sm.TypeDesc!.CSharpName, sm.TypeDesc.UseReflection, sm.TypeDesc.CannotNew, false));
4849
Writer.
Write
(")");
4876
Writer.
Write
(choiceSource);
4877
Writer.
Write
(" = ");
4879
Writer.
Write
(RaCodeGen.GetStringForEnumMember(enumTypeName, choice.MemberIds[elementIndex], choice.Mapping.TypeDesc.UseReflection));
4890
Writer.
Write
("else if (tser == null");
4891
Writer.
Write
(" || ");
4902
Writer.
Write
("ReadSerializable(( ");
4903
Writer.
Write
(typeof(IXmlSerializable).FullName);
4904
Writer.
Write
(")");
4905
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(derived.TypeDesc!.CSharpName, derived.TypeDesc.UseReflection, derived.TypeDesc.CannotNew, false));
4910
Writer.
Write
(")");
4916
Writer.
Write
("throw CreateBadDerivationException(");
4918
Writer.
Write
(", ");
4920
Writer.
Write
(", ");
4922
Writer.
Write
(", ");
4924
Writer.
Write
(", ");
4926
Writer.
Write
(", ");
4934
Writer.
Write
("throw CreateMissingIXmlSerializableType(");
4936
Writer.
Write
(", ");
4938
Writer.
Write
(", ");
4953
Writer.
Write
("while (Reader.NodeType != ");
4954
Writer.
Write
(typeof(XmlNodeType).FullName);
4955
Writer.
Write
(".EndElement && Reader.NodeType != ");
4956
Writer.
Write
(typeof(XmlNodeType).FullName);
4969
Writer.
Write
(length <= StackallocLimit ?
4972
Writer.
Write
(length.ToString(CultureInfo.InvariantCulture));
4979
Writer.
Write
("while (Reader.NodeType == ");
4980
Writer.
Write
(typeof(XmlNodeType).FullName);
4983
Writer.
Write
("string root = Reader.GetAttribute(\"root\", \"");
4984
Writer.
Write
(Soap.Encoding);
4986
Writer.
Write
("if (root == null || ");
4987
Writer.
Write
(typeof(XmlConvert).FullName);
4996
Writer.
Write
(value ? "true" : "false");
5001
Writer.
Write
(typeof(ArrayList).FullName);
5002
Writer.
Write
(" ");
5003
Writer.
Write
(source);
5004
Writer.
Write
(" = new ");
5005
Writer.
Write
(typeof(ArrayList).FullName);
5008
Writer.
Write
(typeof(ArrayList).FullName);
5009
Writer.
Write
(" ");
5010
Writer.
Write
(source);
5011
Writer.
Write
("IsObject = new ");
5012
Writer.
Write
(typeof(ArrayList).FullName);
5019
Writer.
Write
("foreach (object obj in ");
5020
Writer.
Write
(listSource);
5024
Writer.
Write
("bool isObject = (bool)");
5025
Writer.
Write
(listSource);
5029
Writer.
Write
(typeof(Type).FullName);
5042
Writer.
Write
("if (Reader.GetAttribute(\"root\", \"");
5043
Writer.
Write
(Soap.Encoding);
5057
Writer.
Write
(useReflection ? "object" : fullTypeName);
5058
Writer.
Write
(" ");
5059
Writer.
Write
(local);
5067
Writer.
Write
(local);
5068
Writer.
Write
(" = ");
5069
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(fullTypeName, useReflection, mapping.TypeDesc.CannotNew, true));
5075
Writer.
Write
("throw CreateInaccessibleConstructorException(");
5082
Writer.
Write
("throw CreateCtorHasSecurityException(");
5095
Writer.
Write
("catch (");
5096
Writer.
Write
(exceptionType.FullName);
5104
Writer.
Write
("throw CreateInvalidCastException(");
5105
Writer.
Write
(RaCodeGen.GetStringForTypeof(typeDesc.CSharpName, typeDesc.UseReflection));
5106
Writer.
Write
(", ");
5107
Writer.
Write
(source);
5112
Writer.
Write
(", (string)");
5113
Writer.
Write
(id);
System\Xml\Serialization\XmlSerializationWriter.cs (480)
1639
_writer.
Write
($"static {typeof(Type).FullName} {typeVariable} = {assemblyVariable}.GetType(");
1657
_writer.
Write
($"static {typeof(Type).FullName} {typeVariable} = {assemblyVariable}.GetType(");
1685
_writer.
Write
(string.Format(CultureInfo.InvariantCulture, HelperClassesForUseReflection,
1764
_writer.
Write
($"static {typeof(Assembly).FullName} {assemblyVariable} = ResolveDynamicAssembly(");
1781
_writer.
Write
($"static XSPropInfo {propVariable} = new XSPropInfo({typeVariable}, ");
1790
_writer.
Write
($"static XSFieldInfo {fieldVariable} = new XSFieldInfo({typeVariable}, ");
1803
_writer.
Write
($"static {typeof(MethodInfo).FullName} {methodVariable} = {typeVariable}.GetMethod(");
1805
_writer.
Write
(", ");
1808
_writer.
Write
(bindingFlags);
1809
_writer.
Write
(".Public | ");
1810
_writer.
Write
(bindingFlags);
1811
_writer.
Write
(".Instance | ");
1812
_writer.
Write
(bindingFlags);
1813
_writer.
Write
(".Static");
1817
_writer.
Write
(" | ");
1818
_writer.
Write
(bindingFlags);
1819
_writer.
Write
(".NonPublic");
1821
_writer.
Write
(", null, ");
1822
_writer.
Write
($"new {typeof(Type).FullName}[] {{ ");
1825
_writer.
Write
(paramTypes[i]);
1827
_writer.
Write
(", ");
1839
_writer.
Write
("static XSArrayInfo ");
1840
_writer.
Write
(itemVariable);
1841
_writer.
Write
("= new XSArrayInfo(");
1842
_writer.
Write
(GetStringForTypeof(CodeIdentifier.GetCSharpName(type), collectionUseReflection));
1843
_writer.
Write
(".GetProperty(");
1845
_writer.
Write
(",");
1847
_writer.
Write
(GetStringForTypeof(CodeIdentifier.GetCSharpName(defaultIndexer.PropertyType), elementUseReflection));
1848
_writer.
Write
(",new ");
1849
_writer.
Write
(typeof(Type[]).FullName);
2050
_writer.
Write
(typeFullName);
2051
_writer.
Write
(" ");
2052
_writer.
Write
(variableName);
2055
_writer.
Write
(" = ");
2058
_writer.
Write
($"({typeFullName})");
2060
_writer.
Write
(initValue);
2067
_writer.
Write
(useReflection ? "object" : escapedName);
2068
_writer.
Write
(" ");
2069
_writer.
Write
(source);
2070
_writer.
Write
(" = ");
2071
_writer.
Write
(GetStringForCreateInstance(escapedName, useReflection, ctorInaccessible, !useReflection && ctorInaccessible));
2078
_writer.
Write
(source);
2079
_writer.
Write
(" is ");
2080
_writer.
Write
(escapedTypeName);
2083
_writer.
Write
(GetReflectionVariable(escapedTypeName, null));
2084
_writer.
Write
(".IsAssignableFrom(");
2085
_writer.
Write
(source);
2086
_writer.
Write
(".GetType())");
2100
_writer.
Write
(typeName);
2101
_writer.
Write
(" ");
2102
_writer.
Write
(variableName);
2105
_writer.
Write
(" = ");
2107
_writer.
Write
($"({typeName})");
2108
_writer.
Write
(initValue);
2114
_writer.
Write
("case ");
2117
_writer.
Write
(c.Value.ToString(CultureInfo.InvariantCulture));
2121
_writer.
Write
(fullTypeName);
2122
_writer.
Write
(".@");
2124
_writer.
Write
(c.Name);
2126
_writer.
Write
(": ");
2130
_writer.
Write
(variable);
2131
_writer.
Write
(" == ");
2132
_writer.
Write
(GetStringForTypeof(escapedTypeName, useReflection));
2138
_writer.
Write
(variable);
2139
_writer.
Write
(" == typeof(");
2140
_writer.
Write
(escapedTypeName);
2141
_writer.
Write
(")");
2144
_writer.
Write
(variable);
2145
_writer.
Write
(".IsArray ");
2146
_writer.
Write
(" && ");
2154
writer.
Write
("null");
2157
writer.
Write
("@\"");
2163
writer.
Write
("\\r");
2165
writer.
Write
("\\n");
2167
writer.
Write
("\\t");
2171
writer.
Write
("\\x");
2178
writer.
Write
("\"\"");
2185
writer.
Write
("\"");
2250
Writer.
Write
(Access);
2251
Writer.
Write
(" class ");
2252
Writer.
Write
(ClassName);
2253
Writer.
Write
(" : ");
2254
Writer.
Write
(typeof(System.Xml.Serialization.XmlSerializationWriter).FullName);
2343
Writer.
Write
("AddWriteCallback(");
2344
Writer.
Write
(RaCodeGen.GetStringForTypeof(typeMapping.TypeDesc.CSharpName, typeMapping.TypeDesc.UseReflection));
2345
Writer.
Write
(", ");
2347
Writer.
Write
(", ");
2349
Writer.
Write
(", new ");
2350
Writer.
Write
(typeof(System.Xml.Serialization.XmlSerializationWriteCallback).FullName);
2351
Writer.
Write
("(this.");
2352
Writer.
Write
(methodName);
2373
Writer.
Write
(nullable ? ("WriteNullableQualifiedName" + suffix) : "WriteElementQualifiedName");
2374
Writer.
Write
("(");
2378
Writer.
Write
(", ");
2381
Writer.
Write
(", ");
2382
Writer.
Write
(source);
2386
Writer.
Write
(", new System.Xml.XmlQualifiedName(");
2388
Writer.
Write
(", ");
2390
Writer.
Write
(")");
2411
Writer.
Write
(methodName);
2412
Writer.
Write
("(");
2413
Writer.
Write
(source);
2414
Writer.
Write
(")");
2421
Writer.
Write
(source);
2427
Writer.
Write
(typeof(XmlConvert).FullName);
2428
Writer.
Write
(".ToString((");
2429
Writer.
Write
(typeDesc.CSharpName);
2430
Writer.
Write
(")");
2431
Writer.
Write
(source);
2432
Writer.
Write
(")");
2436
Writer.
Write
("From");
2437
Writer.
Write
(typeDesc.FormatterName);
2438
Writer.
Write
("(");
2439
Writer.
Write
(source);
2440
Writer.
Write
(")");
2459
Writer.
Write
("if (");
2461
Writer.
Write
(ReflectionAwareCodeGen.GetStringForEnumLongValue(source, mapping.TypeDesc.UseReflection));
2463
Writer.
Write
(source);
2464
Writer.
Write
(" != ");
2467
Writer.
Write
("(");
2475
Writer.
Write
(RaCodeGen.GetStringForEnumCompare((EnumMapping)mapping, values[i], mapping.TypeDesc.UseReflection));
2477
Writer.
Write
(")");
2481
Writer.
Write
(RaCodeGen.GetStringForEnumCompare((EnumMapping)mapping, (string)defaultValue!, mapping.TypeDesc.UseReflection));
2483
Writer.
Write
(")");
2493
Writer.
Write
(method);
2494
Writer.
Write
("(");
2498
Writer.
Write
(", ");
2502
Writer.
Write
(", ");
2515
Writer.
Write
(", new System.Xml.XmlQualifiedName(");
2517
Writer.
Write
(", ");
2519
Writer.
Write
(")");
2533
Writer.
Write
(methodName);
2534
Writer.
Write
("(");
2536
Writer.
Write
(", ");
2539
Writer.
Write
("null");
2550
Writer.
Write
(methodName);
2551
Writer.
Write
("(");
2553
Writer.
Write
(", ");
2556
Writer.
Write
("null");
2562
Writer.
Write
(", null, ");
2564
Writer.
Write
("true");
2566
Writer.
Write
("false");
2581
Writer.
Write
("WriteEndElement(");
2582
Writer.
Write
(source);
2611
Writer.
Write
("public void ");
2612
Writer.
Write
(methodName);
2637
Writer.
Write
("if (pLength > ");
2638
Writer.
Write
(xmlnsMember.ToString(CultureInfo.InvariantCulture));
2671
Writer.
Write
("if (pLength > ");
2672
Writer.
Write
(index);
2678
Writer.
Write
("if (pLength <= ");
2679
Writer.
Write
(specifiedPosition.ToString(CultureInfo.InvariantCulture));
2680
Writer.
Write
(" || ");
2681
Writer.
Write
(specifiedSource);
2726
Writer.
Write
("if (pLength > ");
2727
Writer.
Write
(index);
2733
Writer.
Write
("if (pLength <= ");
2734
Writer.
Write
(specifiedPosition.ToString(CultureInfo.InvariantCulture));
2735
Writer.
Write
(" || ");
2736
Writer.
Write
(specifiedSource);
2765
Writer.
Write
("WriteRpcResult(");
2767
Writer.
Write
(", ");
2794
Writer.
Write
("if (pLength > ");
2795
Writer.
Write
(mapping.Members.Length.ToString(CultureInfo.InvariantCulture));
2818
Writer.
Write
("public void ");
2819
Writer.
Write
(methodName);
2868
Writer.
Write
("void ");
2869
Writer.
Write
(methodName);
2875
Writer.
Write
("string ");
2876
Writer.
Write
(methodName);
2877
Writer.
Write
("(");
2878
Writer.
Write
(mapping.TypeDesc.UseReflection ? "object" : fullTypeName);
2899
Writer.
Write
("s = ");
2909
Writer.
Write
("default: s = FromEnum(");
2910
Writer.
Write
(ReflectionAwareCodeGen.GetStringForEnumLongValue("v", mapping.TypeDesc.UseReflection));
2911
Writer.
Write
(", new string[] {");
2920
Writer.
Write
("}, new ");
2921
Writer.
Write
(typeof(long).FullName);
2922
Writer.
Write
("[] {");
2929
Writer.
Write
("(long)");
2931
Writer.
Write
(c.Value.ToString(CultureInfo.InvariantCulture));
2934
Writer.
Write
(fullTypeName);
2935
Writer.
Write
(".@");
2937
Writer.
Write
(c.Name);
2941
Writer.
Write
("}, ");
2947
Writer.
Write
("default: throw CreateInvalidEnumValueException(");
2948
Writer.
Write
(ReflectionAwareCodeGen.GetStringForEnumLongValue("v", mapping.TypeDesc.UseReflection));
2949
Writer.
Write
(".ToString(System.Globalization.CultureInfo.InvariantCulture), ");
2958
Writer.
Write
("WriteXsiType(");
2960
Writer.
Write
(", ");
2978
Writer.
Write
("if (");
2990
Writer.
Write
(methodName);
2991
Writer.
Write
("(n, ns,");
2992
if (!derived.TypeDesc.UseReflection) Writer.
Write
($"({fullTypeName})");
2993
Writer.
Write
("o");
2995
Writer.
Write
(", isNullable");
2996
Writer.
Write
(", true");
3017
Writer.
Write
("if (");
3029
Writer.
Write
("WriteXsiType(");
3031
Writer.
Write
(", ");
3034
Writer.
Write
("Writer.WriteString(");
3035
Writer.
Write
(methodName);
3036
Writer.
Write
("(");
3037
if (!mapping.TypeDesc.UseReflection) Writer.
Write
($"({fullTypeName})");
3049
Writer.
Write
("if (");
3058
Writer.
Write
("WriteXsiType(");
3060
Writer.
Write
(", ");
3082
Writer.
Write
("void ");
3083
Writer.
Write
(methodName);
3095
Writer.
Write
("(string n, string ns, ");
3096
Writer.
Write
(mapping.TypeDesc.UseReflection ? "object" : fullTypeName);
3097
Writer.
Write
(" o");
3099
Writer.
Write
(", bool isNullable");
3114
Writer.
Write
(typeof(Type).FullName);
3116
Writer.
Write
("if (");
3164
Writer.
Write
("WriteStartElement(n, ns, o, false, ");
3166
Writer.
Write
("null");
3168
Writer.
Write
(xmlnsSource);
3173
Writer.
Write
("if (needType) WriteXsiType(");
3175
Writer.
Write
(", ");
3192
Writer.
Write
("if (");
3195
Writer.
Write
(methodInvoke);
3201
Writer.
Write
("if (");
3204
Writer.
Write
(memberGet);
3233
Writer.
Write
("if (");
3236
Writer.
Write
(methodInvoke);
3242
Writer.
Write
("if (");
3245
Writer.
Write
(memberGet);
3306
Writer.
Write
("Writer.WriteStartAttribute(null, ");
3308
Writer.
Write
(", ");
3316
Writer.
Write
("null");
3322
Writer.
Write
(typeof(StringBuilder).FullName);
3323
Writer.
Write
(" sb = new ");
3324
Writer.
Write
(typeof(StringBuilder).FullName);
3332
Writer.
Write
(" e = ");
3333
Writer.
Write
(typeof(IEnumerator).FullName);
3336
Writer.
Write
("((");
3337
Writer.
Write
(typeof(IEnumerable).FullName);
3345
Writer.
Write
("(");
3346
Writer.
Write
(typeof(IEnumerator).FullName);
3347
Writer.
Write
(")");
3348
Writer.
Write
(RaCodeGen.GetReflectionVariable(memberTypeDesc.CSharpName, "System.Collections.Generic.IEnumerable*"));
3353
Writer.
Write
("((System.Collections.Generic.IEnumerable<");
3354
Writer.
Write
(arrayElementTypeDesc.CSharpName);
3362
Writer.
Write
("(");
3363
Writer.
Write
(typeof(IEnumerator).FullName);
3364
Writer.
Write
(")");
3366
Writer.
Write
(RaCodeGen.GetStringForMethodInvoke("a", memberTypeDesc.CSharpName, "GetEnumerator", memberTypeDesc.UseReflection));
3378
Writer.
Write
("for (int i = 0; i < ");
3385
Writer.
Write
("((");
3386
Writer.
Write
(typeof(ICollection).FullName);
3399
Writer.
Write
("WriteValue(");
3404
Writer.
Write
("sb.Append(");
3430
Writer.
Write
("WriteAttribute(");
3432
Writer.
Write
(", ");
3437
Writer.
Write
(", ");
3466
Writer.
Write
("WriteXmlAttribute(");
3467
Writer.
Write
(source);
3468
Writer.
Write
(", ");
3469
Writer.
Write
(parent);
3514
Writer.
Write
("throw CreateInvalidChoiceIdentifierValueException(");
3516
Writer.
Write
(", ");
3518
Writer.
Write
(");");
3540
Writer.
Write
(typeof(IEnumerator).FullName);
3541
Writer.
Write
(" e = ");
3544
Writer.
Write
("((");
3545
Writer.
Write
(typeof(IEnumerable).FullName);
3546
Writer.
Write
(")");
3547
Writer.
Write
(arrayName);
3555
Writer.
Write
("(");
3556
Writer.
Write
(typeof(IEnumerator).FullName);
3557
Writer.
Write
(")");
3558
Writer.
Write
(RaCodeGen.GetReflectionVariable(arrayTypeDesc.CSharpName, "System.Collections.Generic.IEnumerable*"));
3559
Writer.
Write
(".Invoke(");
3560
Writer.
Write
(arrayName);
3565
Writer.
Write
("((System.Collections.Generic.IEnumerable<");
3566
Writer.
Write
(arrayElementTypeDesc.CSharpName);
3567
Writer.
Write
(">)");
3568
Writer.
Write
(arrayName);
3576
Writer.
Write
("(");
3577
Writer.
Write
(typeof(IEnumerator).FullName);
3578
Writer.
Write
(")");
3580
Writer.
Write
(RaCodeGen.GetStringForMethodInvoke(arrayName, arrayTypeDesc.CSharpName, "GetEnumerator", arrayTypeDesc.UseReflection));
3592
Writer.
Write
("for (int i");
3593
Writer.
Write
(arrayName);
3594
Writer.
Write
(" = 0; i");
3595
Writer.
Write
(arrayName);
3596
Writer.
Write
(" < ");
3599
Writer.
Write
(arrayName);
3600
Writer.
Write
(".Length");
3604
Writer.
Write
("((");
3605
Writer.
Write
(typeof(ICollection).FullName);
3606
Writer.
Write
(")");
3607
Writer.
Write
(arrayName);
3608
Writer.
Write
(").Count");
3610
Writer.
Write
("; i");
3611
Writer.
Write
(arrayName);
3656
Writer.
Write
("if ((object)(");
3657
Writer.
Write
(source);
3658
Writer.
Write
(") != null)");
3691
if (wroteFirstIf) Writer.
Write
("else ");
3693
Writer.
Write
("if (");
3694
Writer.
Write
(enumUseReflection ? ReflectionAwareCodeGen.GetStringForEnumLongValue(enumSource!, enumUseReflection) : enumSource);
3695
Writer.
Write
(" == ");
3696
Writer.
Write
(enumFullName);
3699
Writer.
Write
(" && ((object)(");
3700
Writer.
Write
(source);
3701
Writer.
Write
(") != null)");
3720
if (wroteFirstIf) Writer.
Write
("else ");
3722
Writer.
Write
("if (");
3736
if (elements.Length - anyCount > 0) Writer.
Write
("else ");
3740
Writer.
Write
("if (");
3741
Writer.
Write
(source);
3742
Writer.
Write
(" is ");
3743
Writer.
Write
(fullTypeName);
3747
Writer.
Write
(fullTypeName);
3748
Writer.
Write
(" elem = (");
3749
Writer.
Write
(fullTypeName);
3750
Writer.
Write
(")");
3751
Writer.
Write
(source);
3758
if (c++ > 0) Writer.
Write
("else ");
3766
Writer.
Write
("if (");
3767
Writer.
Write
(enumUseReflection ? ReflectionAwareCodeGen.GetStringForEnumLongValue(enumSource!, enumUseReflection) : enumSource);
3768
Writer.
Write
(" == ");
3769
Writer.
Write
(enumFullName);
3772
Writer.
Write
(" && ((object)(");
3773
Writer.
Write
(source);
3774
Writer.
Write
(") != null)");
3779
Writer.
Write
("if (elem.Name == ");
3781
Writer.
Write
(" && elem.NamespaceURI == ");
3796
Writer.
Write
("throw CreateChoiceIdentifierValueException(");
3798
Writer.
Write
(", ");
3834
Writer.
Write
("else ");
3835
Writer.
Write
("if (");
3856
Writer.
Write
("else ");
3860
Writer.
Write
(" if ((object)(");
3861
Writer.
Write
(source);
3862
Writer.
Write
(") != null)");
3868
Writer.
Write
("throw CreateUnknownTypeException(");
3869
Writer.
Write
(source);
3884
Writer.
Write
("WriteValue(");
3900
Writer.
Write
(source);
3916
Writer.
Write
("if (");
3917
Writer.
Write
(source);
3942
Writer.
Write
("WritePotentiallyReferencingElement(");
3944
Writer.
Write
(", ");
3946
Writer.
Write
(", ");
3947
Writer.
Write
(source);
3950
Writer.
Write
(", ");
3951
Writer.
Write
(RaCodeGen.GetStringForTypeof(arrayMapping.TypeDesc!.CSharpName, arrayMapping.TypeDesc.UseReflection));
3952
Writer.
Write
(", true, ");
3956
Writer.
Write
(", null, false, ");
3978
Writer.
Write
("if (");
3979
Writer.
Write
(elementArrayName);
3980
Writer.
Write
(" != null)");
3986
Writer.
Write
("for (int ");
3987
Writer.
Write
(arrayIndex);
3988
Writer.
Write
(" = 0; ");
3989
Writer.
Write
(arrayIndex);
3990
Writer.
Write
(" < ");
3994
Writer.
Write
(elementArrayName);
3995
Writer.
Write
(".Length");
3999
Writer.
Write
("((");
4000
Writer.
Write
(typeof(ICollection).FullName);
4001
Writer.
Write
(")");
4002
Writer.
Write
(elementArrayName);
4003
Writer.
Write
(").Count");
4005
Writer.
Write
("; ");
4006
Writer.
Write
(arrayIndex);
4036
Writer.
Write
("if (");
4037
Writer.
Write
(arrayName);
4038
Writer.
Write
(" != null)");
4057
Writer.
Write
("Writer.WriteStartElement(");
4059
Writer.
Write
(", ");
4062
Writer.
Write
(methodName);
4063
Writer.
Write
("(");
4064
Writer.
Write
(source);
4089
Writer.
Write
("WritePotentiallyReferencingElement(");
4091
Writer.
Write
(", ");
4093
Writer.
Write
(", ");
4094
Writer.
Write
(source);
4097
Writer.
Write
(", ");
4098
Writer.
Write
(RaCodeGen.GetStringForTypeof(structMapping.TypeDesc!.CSharpName, structMapping.TypeDesc.UseReflection));
4099
Writer.
Write
(", true, ");
4103
Writer.
Write
(", null, false, ");
4115
Writer.
Write
(methodName);
4116
Writer.
Write
("(");
4118
Writer.
Write
(", ");
4120
Writer.
Write
("null");
4125
Writer.
Write
(", ");
4126
Writer.
Write
(source);
4129
Writer.
Write
(", ");
4132
Writer.
Write
(", false");
4145
Writer.
Write
("if ((");
4146
Writer.
Write
(source);
4147
Writer.
Write
(") is ");
4148
Writer.
Write
(typeof(XmlNode).FullName);
4149
Writer.
Write
(" || ");
4150
Writer.
Write
(source);
4151
Writer.
Write
(" == null");
4162
Writer.
Write
("throw CreateInvalidAnyTypeException(");
4163
Writer.
Write
(source);
4178
Writer.
Write
(func);
4179
Writer.
Write
("((");
4180
Writer.
Write
(cast.FullName);
4181
Writer.
Write
(")");
4182
Writer.
Write
(source);
4183
Writer.
Write
(", ");
4185
Writer.
Write
(", ");
4187
Writer.
Write
(", ");
4189
Writer.
Write
(", ");
4197
Writer.
Write
("if (");
4202
Writer.
Write
("(");
4203
Writer.
Write
(source);
4205
Writer.
Write
(" == null) || (");
4207
Writer.
Write
(" != null) && (");
4208
Writer.
Write
(source);
4209
Writer.
Write
(".Length != 0)");
4213
Writer.
Write
("!");
4214
Writer.
Write
(source);
4215
Writer.
Write
(".Equals(");
4218
Writer.
Write
(")");
4222
Writer.
Write
(source);
4223
Writer.
Write
(" != ");
4227
Writer.
Write
(")");
4232
Writer.
Write
("if (((object)");
4233
Writer.
Write
(source);
4234
Writer.
Write
(") != null && !(");
4236
Writer.
Write
(")) throw CreateMismatchChoiceException(");
4238
Writer.
Write
(", ");
4240
Writer.
Write
(", ");
4247
Writer.
Write
("if ((object)(");
4248
Writer.
Write
(source);
4262
Writer.
Write
("null");
4278
Writer.
Write
("\'");
4284
Writer.
Write
(((int)value).ToString(null, NumberFormatInfo.InvariantInfo));
4289
Writer.
Write
("System.Double.NaN");
4293
Writer.
Write
("System.Double.PositiveInfinity");
4297
Writer.
Write
("System.Double.NegativeInfinity");
4301
Writer.
Write
(((double)value).ToString("R", NumberFormatInfo.InvariantInfo));
4305
Writer.
Write
((bool)value ? "true" : "false");
4308
Writer.
Write
("(");
4309
Writer.
Write
(type.FullName);
4310
Writer.
Write
(")");
4311
Writer.
Write
("(");
4312
Writer.
Write
(Convert.ToString(value, NumberFormatInfo.InvariantInfo));
4313
Writer.
Write
(")");
4319
Writer.
Write
("System.Single.NaN");
4323
Writer.
Write
("System.Single.PositiveInfinity");
4327
Writer.
Write
("System.Single.NegativeInfinity");
4331
Writer.
Write
(((float)value).ToString("R", NumberFormatInfo.InvariantInfo));
4332
Writer.
Write
("f");
4337
Writer.
Write
(((decimal)value).ToString(null, NumberFormatInfo.InvariantInfo));
4338
Writer.
Write
("m");
4342
Writer.
Write
(" new ");
4343
Writer.
Write
(type.FullName);
4344
Writer.
Write
("(");
4345
Writer.
Write
(((DateTime)value).Ticks.ToString(CultureInfo.InvariantCulture));
4346
Writer.
Write
(")");
4350
Writer.
Write
(" new ");
4351
Writer.
Write
(type.FullName);
4352
Writer.
Write
("(");
4353
Writer.
Write
(((DateTimeOffset)value).Ticks.ToString(CultureInfo.InvariantCulture));
4354
Writer.
Write
(", new ");
4355
Writer.
Write
(((DateTimeOffset)value).Offset.GetType().FullName);
4356
Writer.
Write
("(");
4357
Writer.
Write
(((DateTimeOffset)value).Offset.Ticks.ToString(CultureInfo.InvariantCulture));
4358
Writer.
Write
("))");
4362
Writer.
Write
(" new ");
4363
Writer.
Write
(type.FullName);
4364
Writer.
Write
("(");
4365
Writer.
Write
(((TimeSpan)value).Ticks.ToString(CultureInfo.InvariantCulture));
4366
Writer.
Write
(")");
4372
Writer.
Write
(((int)value).ToString(null, NumberFormatInfo.InvariantInfo));
4385
Writer.
Write
("WriteNamespaceDeclarations(");
4386
Writer.
Write
(source);
4403
Writer.
Write
("for (int i = ");
4404
Writer.
Write
(loopStartSource);
4405
Writer.
Write
("; i < ");
4406
Writer.
Write
(loopEndSource);