995 references to Write
System.Xml (995)
System\Xml\Serialization\Compilation.cs (6)
342
writer.
Write
("[assembly:");
343
writer.
Write
(typeof(XmlSerializerVersionAttribute).FullName);
344
writer.
Write
("(");
345
writer.
Write
("ParentAssemblyId=");
347
writer.
Write
(", Version=");
350
writer.
Write
(", Namespace=");
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (83)
119
writer.
Write
(typeof(Hashtable).FullName);
120
writer.
Write
(" ");
121
writer.
Write
(privateName);
123
writer.
Write
("public override ");
124
writer.
Write
(typeof(Hashtable).FullName);
126
writer.
Write
(" ");
127
writer.
Write
(publicName);
134
writer.
Write
("if (");
135
writer.
Write
(privateName);
139
writer.
Write
(typeof(Hashtable).FullName);
140
writer.
Write
(" _tmp = new ");
141
writer.
Write
(typeof(Hashtable).FullName);
147
writer.
Write
("if (");
148
writer.
Write
(privateName);
149
writer.
Write
(" == null) ");
150
writer.
Write
(privateName);
155
writer.
Write
("return ");
156
writer.
Write
(privateName);
170
writer.
Write
("_tmp[");
172
writer.
Write
("] = ");
181
writer.
Write
("public override ");
182
writer.
Write
(typeof(bool).FullName);
183
writer.
Write
(" CanSerialize(");
184
writer.
Write
(typeof(Type).FullName);
202
writer.
Write
("if (type == typeof(");
203
writer.
Write
(CodeIdentifier.GetCSharpName(type));
216
writer.
Write
("public abstract class ");
217
writer.
Write
(CodeIdentifier.GetCSharpName(baseSerializer));
218
writer.
Write
(" : ");
219
writer.
Write
(typeof(XmlSerializer).FullName);
223
writer.
Write
("protected override ");
224
writer.
Write
(typeof(XmlSerializationReader).FullName);
227
writer.
Write
("return new ");
228
writer.
Write
(readerClass);
233
writer.
Write
("protected override ");
234
writer.
Write
(typeof(XmlSerializationWriter).FullName);
237
writer.
Write
("return new ");
238
writer.
Write
(writerClass);
254
writer.
Write
("public sealed class ");
255
writer.
Write
(CodeIdentifier.GetCSharpName(serializerName));
256
writer.
Write
(" : ");
257
writer.
Write
(baseSerializer);
262
writer.
Write
("public override ");
263
writer.
Write
(typeof(bool).FullName);
264
writer.
Write
(" CanDeserialize(");
265
writer.
Write
(typeof(XmlReader).FullName);
273
writer.
Write
("return xmlReader.IsStartElement(");
275
writer.
Write
(", ");
284
writer.
Write
("protected override void Serialize(object objectToSerialize, ");
285
writer.
Write
(typeof(XmlSerializationWriter).FullName);
288
writer.
Write
("((");
289
writer.
Write
(writerClass);
290
writer.
Write
(")writer).");
291
writer.
Write
(writeMethod);
292
writer.
Write
("(");
294
writer.
Write
("(object[])");
302
writer.
Write
("protected override object Deserialize(");
303
writer.
Write
(typeof(XmlSerializationReader).FullName);
306
writer.
Write
("return ((");
307
writer.
Write
(readerClass);
308
writer.
Write
(")reader).");
309
writer.
Write
(readMethod);
325
writer.
Write
("_tmp.Add(");
327
writer.
Write
(", new ");
328
writer.
Write
((string)serializers[key]);
336
writer.
Write
("public override ");
337
writer.
Write
(typeof(XmlSerializer).FullName);
338
writer.
Write
(" GetSerializer(");
339
writer.
Write
(typeof(Type).FullName);
354
writer.
Write
("if (type == typeof(");
355
writer.
Write
(CodeIdentifier.GetCSharpName(type));
356
writer.
Write
(")) return new ");
357
writer.
Write
((string)serializers[xmlMappings[i].Key]);
368
writer.
Write
("public class XmlSerializerContract : global::");
369
writer.
Write
(typeof(XmlSerializerImplementation).FullName);
373
writer.
Write
("public override global::");
374
writer.
Write
(typeof(XmlSerializationReader).FullName);
375
writer.
Write
(" Reader { get { return new ");
376
writer.
Write
(readerType);
379
writer.
Write
("public override global::");
380
writer.
Write
(typeof(XmlSerializationWriter).FullName);
381
writer.
Write
(" Writer { get { return new ");
382
writer.
Write
(writerType);
System\Xml\Serialization\XmlSerializationReader.cs (445)
2119
Writer.
Write
(Access);
2120
Writer.
Write
(" class ");
2121
Writer.
Write
(ClassName);
2122
Writer.
Write
(" : ");
2123
Writer.
Write
(typeof(XmlSerializationReader).FullName);
2178
Writer.
Write
("string ");
2179
Writer.
Write
(idName);
2189
Writer.
Write
(idName);
2190
Writer.
Write
(" = Reader.NameTable.Add(");
2215
Writer.
Write
("if (Reader.IsStartElement(");
2217
Writer.
Write
(", ");
2228
Writer.
Write
(func);
2229
Writer.
Write
("(");
2230
Writer.
Write
(node);
2232
Writer.
Write
(", ");
2266
Writer.
Write
("AddReadCallback(");
2268
Writer.
Write
(", ");
2270
Writer.
Write
(", ");
2271
Writer.
Write
(RaCodeGen.GetStringForTypeof(mapping.TypeDesc.CSharpName,mapping.TypeDesc.UseReflection));
2272
Writer.
Write
(", new ");
2273
Writer.
Write
(typeof(XmlSerializationReadCallback).FullName);
2274
Writer.
Write
("(this.");
2275
Writer.
Write
(methodName);
2286
Writer.
Write
("object ");
2287
Writer.
Write
(dummyArrayMethodName);
2336
Writer.
Write
("public object[] ");
2337
Writer.
Write
(methodName);
2342
Writer.
Write
("object[] p = new object[");
2343
Writer.
Write
(mappings.Length.ToString(CultureInfo.InvariantCulture));
2473
Writer.
Write
(arrayName);
2474
Writer.
Write
("[");
2475
Writer.
Write
(i.ToString(CultureInfo.InvariantCulture));
2476
Writer.
Write
("] = ");
2479
Writer.
Write
("null");
2482
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(mappings[i].TypeDesc.CSharpName, mappings[i].TypeDesc.UseReflection, false, false));
2496
Writer.
Write
("public object[] ");
2497
Writer.
Write
(methodName);
2503
Writer.
Write
("object[] p = new object[");
2504
Writer.
Write
(mappings.Length.ToString(CultureInfo.InvariantCulture));
2512
Writer.
Write
("if (!");
2590
Writer.
Write
(item);
2591
Writer.
Write
(" ");
2592
Writer.
Write
("ci =");
2593
Writer.
Write
("("+item+")");
2594
Writer.
Write
(source);
2599
Writer.
Write
(RaCodeGen.GetStringForMethod("c", td.CSharpName,"Add",useReflection));
2604
Writer.
Write
( "ci[i]");
2606
Writer.
Write
(RaCodeGen.GetReflectionVariable(typeof(Array).FullName, "0") + "[ci , i]");
2620
Writer.
Write
("public object ");
2621
Writer.
Write
(methodName);
2657
Writer.
Write
("(");
2658
Writer.
Write
(mapping.TypeDesc.CSharpName);
2659
Writer.
Write
(")");
2661
Writer.
Write
(enumMethodName);
2662
Writer.
Write
("(");
2663
if (!mapping.IsSoap) Writer.
Write
(source);
2664
Writer.
Write
(")");
2667
Writer.
Write
(source);
2671
Writer.
Write
("CollapseWhitespace(");
2672
Writer.
Write
(source);
2673
Writer.
Write
(")");
2676
Writer.
Write
(source);
2681
Writer.
Write
(typeof(XmlConvert).FullName);
2682
Writer.
Write
(".");
2684
Writer.
Write
("To");
2685
Writer.
Write
(mapping.TypeDesc.FormatterName);
2686
Writer.
Write
("(");
2687
Writer.
Write
(source);
2688
Writer.
Write
(")");
2720
Writer.
Write
(typeof(Hashtable).FullName);
2721
Writer.
Write
(" ");
2722
Writer.
Write
(memberName);
2726
Writer.
Write
("internal ");
2727
Writer.
Write
(typeof(Hashtable).FullName);
2728
Writer.
Write
(" ");
2729
Writer.
Write
(propName);
2736
Writer.
Write
("if ((object)");
2737
Writer.
Write
(memberName);
2741
Writer.
Write
(typeof(Hashtable).FullName);
2742
Writer.
Write
(" h = new ");
2743
Writer.
Write
(typeof(Hashtable).FullName);
2749
Writer.
Write
("h.Add(");
2752
Writer.
Write
(", (long)");
2753
Writer.
Write
(mapping.TypeDesc.CSharpName);
2754
Writer.
Write
(".@");
2756
Writer.
Write
(constants[i].Name);
2759
Writer.
Write
(", ");
2760
Writer.
Write
(constants[i].Value.ToString(CultureInfo.InvariantCulture)+"L");
2766
Writer.
Write
(memberName);
2772
Writer.
Write
("return ");
2773
Writer.
Write
(memberName);
2796
Writer.
Write
("object");
2797
Writer.
Write
(" ");
2798
Writer.
Write
(methodName);
2804
Writer.
Write
(useReflection?"object":fullTypeName);
2805
Writer.
Write
(" ");
2806
Writer.
Write
(methodName);
2814
Writer.
Write
("return ");
2815
Writer.
Write
(typeof(Enum).FullName);
2816
Writer.
Write
(".ToObject(");
2817
Writer.
Write
(RaCodeGen.GetStringForTypeof(fullTypeName, useReflection));
2818
Writer.
Write
(", ToEnum(s, ");
2819
Writer.
Write
(tableName);
2820
Writer.
Write
(", ");
2825
Writer.
Write
("return (");
2826
Writer.
Write
(fullTypeName);
2827
Writer.
Write
(")ToEnum(s, ");
2828
Writer.
Write
(tableName);
2829
Writer.
Write
(", ");
2843
Writer.
Write
("case ");
2845
Writer.
Write
(": return ");
2846
Writer.
Write
(RaCodeGen.GetStringForEnumMember(fullTypeName, c.Name, useReflection));
2852
Writer.
Write
("default: throw CreateUnknownConstantException(s, ");
2853
Writer.
Write
(RaCodeGen.GetStringForTypeof(fullTypeName, useReflection));
2866
Writer.
Write
("else if (");
2877
Writer.
Write
("return ");
2879
Writer.
Write
("(" + returnTypeName + ")");
2880
Writer.
Write
(methodName);
2881
Writer.
Write
("(");
2883
Writer.
Write
("isNullable, ");
2899
Writer.
Write
("else if (");
2909
Writer.
Write
("object e = ");
2910
Writer.
Write
(methodName);
2920
Writer.
Write
("else if (");
2933
Writer.
Write
(typeof(Array).FullName);
2935
Writer.
Write
("object");
2938
Writer.
Write
(fullTypeName);
2939
Writer.
Write
(" a = ");
2941
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(fullTypeName, td.UseReflection, false, false));
2963
Writer.
Write
(typeName);
2964
Writer.
Write
(" ");
2965
Writer.
Write
(methodName);
2969
Writer.
Write
(typeName);
2970
Writer.
Write
(" o = ");
2973
Writer.
Write
("null");
2976
Writer.
Write
("default(");
2977
Writer.
Write
(typeName);
2978
Writer.
Write
(")");
3012
Writer.
Write
(typeName);
3013
Writer.
Write
(" ");
3014
Writer.
Write
(methodName);
3015
Writer.
Write
("(");
3017
Writer.
Write
("bool isNullable, ");
3021
Writer.
Write
(typeof(XmlQualifiedName).FullName);
3033
Writer.
Write
("else return ");
3035
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(structMapping.TypeDesc.CSharpName, useReflection, false, false));
3044
Writer.
Write
("if (xsiType == null");
3046
Writer.
Write
(" || ");
3061
Writer.
Write
("return ReadTypedPrimitive((");
3063
Writer.
Write
("throw CreateUnknownTypeException((");
3064
Writer.
Write
(typeof(XmlQualifiedName).FullName);
3073
Writer.
Write
("throw CreateAbstractTypeException(");
3075
Writer.
Write
(", ");
3196
Writer.
Write
("object");
3197
Writer.
Write
(" ");
3198
Writer.
Write
(methodName);
3199
Writer.
Write
("(");
3208
Writer.
Write
("throw CreateAbstractTypeException(");
3210
Writer.
Write
(", ");
3265
Writer.
Write
("void ");
3266
Writer.
Write
(fixupMethodName);
3277
Writer.
Write
("if (ids[");
3278
Writer.
Write
(fixupIndex);
3298
Writer.
Write
(targetSource);
3303
Writer.
Write
(member.CheckSpecifiedSource);
3329
Writer.
Write
("if ((object)(");
3330
Writer.
Write
(memberSource);
3335
Writer.
Write
("throw CreateReadOnlyCollectionException(");
3340
Writer.
Write
(memberSource);
3341
Writer.
Write
(" = ");
3342
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(typeDesc.CSharpName, typeDesc.UseReflection, typeDesc.CannotNew, true));
3349
Writer.
Write
("CollectionFixup collectionFixup = new CollectionFixup(");
3350
Writer.
Write
(memberSource);
3351
Writer.
Write
(", ");
3352
Writer.
Write
("new ");
3353
Writer.
Write
(typeof(XmlSerializationCollectionFixupCallback).FullName);
3354
Writer.
Write
("(this.");
3355
Writer.
Write
(create.Name);
3356
Writer.
Write
("), ");
3357
Writer.
Write
(targetSource);
3363
Writer.
Write
("void ");
3364
Writer.
Write
(c.Name);
3383
Writer.
Write
("((object) ((");
3384
Writer.
Write
(typeof(XmlQualifiedName).FullName);
3385
Writer.
Write
(")");
3386
Writer.
Write
(source);
3387
Writer.
Write
(").Name == (object)");
3389
Writer.
Write
(" && (object) ((");
3390
Writer.
Write
(typeof(XmlQualifiedName).FullName);
3391
Writer.
Write
(")");
3392
Writer.
Write
(source);
3393
Writer.
Write
(").Namespace == (object)");
3395
Writer.
Write
(")");
3399
Writer.
Write
("(");
3401
Writer.
Write
("(object) ");
3402
Writer.
Write
(source);
3403
Writer.
Write
(".LocalName == (object)");
3405
Writer.
Write
(" && ");
3407
Writer.
Write
("(object) ");
3408
Writer.
Write
(source);
3409
Writer.
Write
(".NamespaceURI == (object)");
3411
Writer.
Write
(")");
3425
Writer.
Write
(idName);
3452
Writer.
Write
("else ");
3454
Writer.
Write
("if (");
3456
Writer.
Write
("!");
3457
Writer.
Write
(member.ParamsReadSource);
3458
Writer.
Write
(" && ");
3475
Writer.
Write
("else ");
3481
Writer.
Write
("if (");
3482
Writer.
Write
(xmlnsMember.Source);
3483
Writer.
Write
(" == null) ");
3484
Writer.
Write
(xmlnsMember.Source);
3485
Writer.
Write
(" = new ");
3486
Writer.
Write
(xmlnsMember.Mapping.TypeDesc.CSharpName);
3490
Writer.
Write
("(("+xmlnsMember.Mapping.TypeDesc.CSharpName+")"+ xmlnsMember.ArraySource+")");
3504
Writer.
Write
(typeof(XmlAttribute).FullName);
3505
Writer.
Write
(" attr = ");
3506
Writer.
Write
("(");
3507
Writer.
Write
(typeof(XmlAttribute).FullName);
3513
Writer.
Write
(elseCall);
3514
Writer.
Write
("(");
3515
Writer.
Write
(firstParam);
3517
Writer.
Write
(", ");
3546
Writer.
Write
("attr");
3551
Writer.
Write
("if (attr is ");
3552
Writer.
Write
(typeof(XmlAttribute).FullName);
3556
Writer.
Write
("(");
3557
Writer.
Write
(typeof(XmlAttribute).FullName);
3558
Writer.
Write
(")attr");
3591
Writer.
Write
(member.CheckSpecifiedSource);
3595
Writer.
Write
(member.ParamsReadSource);
3615
Writer.
Write
("Fixup fixup = new Fixup(");
3616
Writer.
Write
(source);
3617
Writer.
Write
(", ");
3618
Writer.
Write
("new ");
3619
Writer.
Write
(typeof(XmlSerializationFixupCallback).FullName);
3620
Writer.
Write
("(this.");
3621
Writer.
Write
(fixupMethodName);
3622
Writer.
Write
("), ");
3623
Writer.
Write
(fixupCount.ToString(CultureInfo.InvariantCulture));
3646
Writer.
Write
("int ");
3647
Writer.
Write
(c);
3654
Writer.
Write
("int c");
3655
Writer.
Write
(member.ChoiceArrayName);
3664
Writer.
Write
(member.Source);
3665
Writer.
Write
(a);
3674
Writer.
Write
("if ((object)(");
3675
Writer.
Write
(member.Source);
3676
Writer.
Write
(") == null) ");
3678
Writer.
Write
("throw CreateReadOnlyCollectionException(");
3683
Writer.
Write
(member.Source);
3684
Writer.
Write
(" = ");
3685
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(typeDescFullName, useReflection, typeDesc.CannotNew, true));
3735
Writer.
Write
("if (Reader.NodeType == ");
3736
Writer.
Write
(typeof(XmlNodeType).FullName);
3762
Writer.
Write
("else if (Reader.NodeType == ");
3763
Writer.
Write
(typeof(XmlNodeType).FullName);
3765
Writer.
Write
("Reader.NodeType == ");
3766
Writer.
Write
(typeof(XmlNodeType).FullName);
3768
Writer.
Write
("Reader.NodeType == ");
3769
Writer.
Write
(typeof(XmlNodeType).FullName);
3771
Writer.
Write
("Reader.NodeType == ");
3772
Writer.
Write
(typeof(XmlNodeType).FullName);
3780
Writer.
Write
(elseString);
3796
Writer.
Write
("Document.CreateTextNode(Reader.ReadString())");
3807
Writer.
Write
("CollapseWhitespace(Reader.ReadString())");
3810
Writer.
Write
("Reader.ReadString()");
3815
Writer.
Write
("tmp = ReadString(tmp, ");
3822
Writer.
Write
("tmp");
3841
Writer.
Write
(checkTypeHrefsSource);
3843
Writer.
Write
(checkTypeHrefsSource);
3849
Writer.
Write
(checkTypeHrefsSource);
3851
Writer.
Write
(checkTypeHrefsSource);
3909
Writer.
Write
("else ");
3912
Writer.
Write
("case ");
3913
Writer.
Write
(cases.ToString(CultureInfo.InvariantCulture));
3919
Writer.
Write
("if (");
3921
Writer.
Write
("!");
3922
Writer.
Write
(member.ParamsReadSource);
3923
Writer.
Write
(" && ");
3928
Writer.
Write
(RaCodeGen.GetStringForTypeof(td.CSharpName, td.UseReflection));
3931
Writer.
Write
(RaCodeGen.GetStringForTypeof(e.Mapping.TypeDesc.CSharpName, e.Mapping.TypeDesc.UseReflection));
3933
Writer.
Write
(".IsAssignableFrom(");
3934
Writer.
Write
(checkTypeSource);
3935
Writer.
Write
("Type)");
3939
Writer.
Write
("(IsReturnValue || ");
3941
Writer.
Write
("true");
3947
Writer.
Write
(")");
3953
Writer.
Write
("if (");
3954
Writer.
Write
(checkTypeSource);
3961
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(e.Mapping.TypeDesc.CSharpName, e.Mapping.TypeDesc.UseReflection, false, true, "(" + td.CSharpName + ")" + checkTypeSource));
3965
Writer.
Write
(checkTypeSource);
3974
Writer.
Write
("fixup.Ids[");
3975
Writer.
Write
(member.FixupIndex.ToString(CultureInfo.InvariantCulture));
3976
Writer.
Write
("] = ");
3977
Writer.
Write
(checkTypeSource);
3987
Writer.
Write
(member.ParamsReadSource);
3999
Writer.
Write
("state = ");
4000
Writer.
Write
(cases.ToString(CultureInfo.InvariantCulture));
4076
Writer.
Write
(" soap[1] = ");
4084
Writer.
Write
("(" +arrayTypeFullName +"[])");
4085
Writer.
Write
("ShrinkArray(");
4086
Writer.
Write
(a);
4087
Writer.
Write
(", ");
4088
Writer.
Write
(c);
4089
Writer.
Write
(", ");
4090
Writer.
Write
(RaCodeGen.GetStringForTypeof(arrayTypeFullName, arrayUseReflection));
4091
Writer.
Write
(", ");
4093
Writer.
Write
(")");
4105
Writer.
Write
("(" +choiceTypeName+"[])");
4106
Writer.
Write
("ShrinkArray(");
4107
Writer.
Write
(a);
4108
Writer.
Write
(", ");
4109
Writer.
Write
(c);
4110
Writer.
Write
(", ");
4111
Writer.
Write
(RaCodeGen.GetStringForTypeof(choiceTypeName, choiceUseReflection));
4112
Writer.
Write
(", ");
4114
Writer.
Write
(")");
4121
Writer.
Write
(member.Source);
4122
Writer.
Write
(" = ");
4123
Writer.
Write
(member.ArrayName);
4133
Writer.
Write
("(");
4134
Writer.
Write
(typeDesc.CSharpName);
4135
Writer.
Write
(")");
4140
Writer.
Write
(source);
4142
Writer.
Write
(" = ");
4149
Writer.
Write
(")");
4151
Writer.
Write
("})");
4156
Writer.
Write
("object rre = ");
4157
Writer.
Write
(fixupIndex >= 0 ? "ReadReferencingElement" : "ReadReferencedElement");
4158
Writer.
Write
("(");
4160
Writer.
Write
(", ");
4163
Writer.
Write
(", ");
4164
Writer.
Write
("out fixup.Ids[");
4165
Writer.
Write
((fixupIndex).ToString(CultureInfo.InvariantCulture));
4166
Writer.
Write
("]");
4182
Writer.
Write
("rre");
4203
Writer.
Write
("if (((object)(");
4204
Writer.
Write
(member.ArrayName);
4205
Writer.
Write
(") == null) || ");
4208
Writer.
Write
("if (");
4249
Writer.
Write
(checkSpecified);
4263
Writer.
Write
(methodName);
4264
Writer.
Write
("(true)");
4274
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(element.Mapping.TypeDesc.CSharpName, element.Mapping.TypeDesc.UseReflection, false, false));
4277
Writer.
Write
("null");
4283
Writer.
Write
("else ");
4305
Writer.
Write
("default(System.TimeSpan)");
4323
Writer.
Write
("ReadElementQualifiedName()");
4348
Writer.
Write
("object rre = ");
4349
Writer.
Write
(fixupIndex >= 0 ? "ReadReferencingElement" : "ReadReferencedElement");
4350
Writer.
Write
("(");
4352
Writer.
Write
(", ");
4356
Writer.
Write
(", out fixup.Ids[");
4357
Writer.
Write
((fixupIndex).ToString(CultureInfo.InvariantCulture));
4358
Writer.
Write
("]");
4360
Writer.
Write
(")");
4372
Writer.
Write
("rre");
4376
Writer.
Write
("Referenced(");
4377
Writer.
Write
(source);
4392
Writer.
Write
("if ((object)(");
4393
Writer.
Write
(arrayName);
4394
Writer.
Write
(") == null) Reader.Skip(); else ");
4397
Writer.
Write
(methodName);
4398
Writer.
Write
("(");
4401
Writer.
Write
(", ");
4403
Writer.
Write
("true");
4404
Writer.
Write
(")");
4415
Writer.
Write
(isDoc ? "ReadXmlDocument(" : "ReadXmlNode(");
4416
Writer.
Write
(element.Any ? "false" : "true");
4417
Writer.
Write
(")");
4425
Writer.
Write
(typeof(XmlQualifiedName).FullName);
4427
Writer.
Write
("if (tser == null");
4428
Writer.
Write
(" || ");
4435
Writer.
Write
("ReadSerializable(( ");
4436
Writer.
Write
(typeof(IXmlSerializable).FullName);
4437
Writer.
Write
(")");
4438
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(sm.TypeDesc.CSharpName, sm.TypeDesc.UseReflection, sm.TypeDesc.CannotNew, false));
4443
Writer.
Write
(")");
4467
Writer.
Write
(choiceSource);
4468
Writer.
Write
(" = ");
4470
Writer.
Write
(RaCodeGen.GetStringForEnumMember(enumTypeName, choice.MemberIds[elementIndex], choice.Mapping.TypeDesc.UseReflection));
4479
Writer.
Write
("else if (tser == null");
4480
Writer.
Write
(" || ");
4489
Writer.
Write
("ReadSerializable(( ");
4490
Writer.
Write
(typeof(IXmlSerializable).FullName);
4491
Writer.
Write
(")");
4492
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(derived.TypeDesc.CSharpName, derived.TypeDesc.UseReflection, derived.TypeDesc.CannotNew, false));
4496
Writer.
Write
(")");
4501
Writer.
Write
("throw CreateBadDerivationException(");
4503
Writer.
Write
(", ");
4505
Writer.
Write
(", ");
4507
Writer.
Write
(", ");
4509
Writer.
Write
(", ");
4511
Writer.
Write
(", ");
4518
Writer.
Write
("throw CreateMissingIXmlSerializableType(");
4520
Writer.
Write
(", ");
4522
Writer.
Write
(", ");
4538
Writer.
Write
("while (Reader.NodeType != ");
4539
Writer.
Write
(typeof(XmlNodeType).FullName);
4540
Writer.
Write
(".EndElement && Reader.NodeType != ");
4541
Writer.
Write
(typeof(XmlNodeType).FullName);
4566
Writer.
Write
("bool[] paramsRead = new bool[");
4567
Writer.
Write
(length.ToString(CultureInfo.InvariantCulture));
4574
Writer.
Write
("while (Reader.NodeType == ");
4575
Writer.
Write
(typeof(XmlNodeType).FullName);
4578
Writer.
Write
("string root = Reader.GetAttribute(\"root\", \"");
4579
Writer.
Write
(Soap.Encoding);
4581
Writer.
Write
("if (root == null || ");
4582
Writer.
Write
(typeof(XmlConvert).FullName);
4590
Writer.
Write
(value ? "true" : "false");
4594
Writer.
Write
(typeof(ArrayList).FullName);
4595
Writer.
Write
(" ");
4596
Writer.
Write
(source);
4597
Writer.
Write
(" = new ");
4598
Writer.
Write
(typeof(ArrayList).FullName);
4601
Writer.
Write
(typeof(ArrayList).FullName);
4602
Writer.
Write
(" ");
4603
Writer.
Write
(source);
4604
Writer.
Write
("IsObject = new ");
4605
Writer.
Write
(typeof(ArrayList).FullName);
4611
Writer.
Write
("foreach (object obj in ");
4612
Writer.
Write
(listSource);
4616
Writer.
Write
("bool isObject = (bool)");
4617
Writer.
Write
(listSource);
4621
Writer.
Write
(typeof(Type).FullName);
4633
Writer.
Write
("if (Reader.GetAttribute(\"root\", \"");
4634
Writer.
Write
(Soap.Encoding);
4647
Writer.
Write
(useReflection ? "object" : fullTypeName);
4648
Writer.
Write
(" ");
4649
Writer.
Write
(local);
4656
Writer.
Write
(local);
4657
Writer.
Write
(" = ");
4658
Writer.
Write
(RaCodeGen.GetStringForCreateInstance(fullTypeName, useReflection, mapping.TypeDesc.CannotNew, true));
4663
Writer.
Write
("throw CreateInaccessibleConstructorException(");
4670
Writer.
Write
("throw CreateCtorHasSecurityException(");
4682
Writer.
Write
("catch (");
4683
Writer.
Write
(exceptionType.FullName);
4690
Writer.
Write
("throw CreateInvalidCastException(");
4691
Writer.
Write
(RaCodeGen.GetStringForTypeof(typeDesc.CSharpName, typeDesc.UseReflection));
4692
Writer.
Write
(", ");
4693
Writer.
Write
(source);
4697
Writer.
Write
(", (string)");
4698
Writer.
Write
(id);
System\Xml\Serialization\XmlSerializationWriter.cs (461)
1310
Writer.
Write
(Access);
1311
Writer.
Write
(" class ");
1312
Writer.
Write
(ClassName);
1313
Writer.
Write
(" : ");
1314
Writer.
Write
(typeof(XmlSerializationWriter).FullName);
1385
Writer.
Write
("AddWriteCallback(");
1386
Writer.
Write
(RaCodeGen.GetStringForTypeof(typeMapping.TypeDesc.CSharpName, typeMapping.TypeDesc.UseReflection));
1387
Writer.
Write
(", ");
1389
Writer.
Write
(", ");
1391
Writer.
Write
(", new ");
1392
Writer.
Write
(typeof(XmlSerializationWriteCallback).FullName);
1393
Writer.
Write
("(this.");
1394
Writer.
Write
(methodName);
1411
Writer.
Write
(nullable ? ("WriteNullableQualifiedName" + suffix): "WriteElementQualifiedName");
1412
Writer.
Write
("(");
1415
Writer.
Write
(", ");
1418
Writer.
Write
(", ");
1419
Writer.
Write
(source);
1422
Writer.
Write
(", new System.Xml.XmlQualifiedName(");
1424
Writer.
Write
(", ");
1426
Writer.
Write
(")");
1445
Writer.
Write
(methodName);
1446
Writer.
Write
("(");
1447
Writer.
Write
(source);
1448
Writer.
Write
(")");
1453
Writer.
Write
(source);
1457
Writer.
Write
(typeof(XmlConvert).FullName);
1458
Writer.
Write
(".ToString((");
1459
Writer.
Write
(typeDesc.CSharpName);
1460
Writer.
Write
(")");
1461
Writer.
Write
(source);
1462
Writer.
Write
(")");
1465
Writer.
Write
("From");
1466
Writer.
Write
(typeDesc.FormatterName);
1467
Writer.
Write
("(");
1468
Writer.
Write
(source);
1469
Writer.
Write
(")");
1484
Writer.
Write
("if (");
1486
Writer.
Write
(RaCodeGen.GetStringForEnumLongValue(source, mapping.TypeDesc.UseReflection));
1488
Writer.
Write
(source);
1489
Writer.
Write
(" != ");
1491
Writer.
Write
("(");
1498
Writer.
Write
(RaCodeGen.GetStringForEnumCompare((EnumMapping)mapping, values[i], mapping.TypeDesc.UseReflection));
1500
Writer.
Write
(")");
1503
Writer.
Write
(RaCodeGen.GetStringForEnumCompare((EnumMapping)mapping, (string)defaultValue, mapping.TypeDesc.UseReflection));
1505
Writer.
Write
(")");
1513
Writer.
Write
(method);
1514
Writer.
Write
("(");
1517
Writer.
Write
(", ");
1520
Writer.
Write
(", ");
1530
Writer.
Write
(", new System.Xml.XmlQualifiedName(");
1532
Writer.
Write
(", ");
1534
Writer.
Write
(")");
1546
Writer.
Write
(methodName);
1547
Writer.
Write
("(");
1549
Writer.
Write
(", ");
1551
Writer.
Write
("null");
1560
Writer.
Write
(methodName);
1561
Writer.
Write
("(");
1563
Writer.
Write
(", ");
1565
Writer.
Write
("null");
1570
Writer.
Write
(", null, ");
1572
Writer.
Write
("true");
1574
Writer.
Write
("false");
1586
Writer.
Write
("WriteEndElement(");
1587
Writer.
Write
(source);
1611
Writer.
Write
("public void ");
1612
Writer.
Write
(methodName);
1635
Writer.
Write
("if (pLength > ");
1636
Writer.
Write
(xmlnsMember.ToString(CultureInfo.InvariantCulture));
1663
Writer.
Write
("if (pLength > ");
1664
Writer.
Write
(i.ToString(CultureInfo.InvariantCulture));
1669
Writer.
Write
("if (pLength <= ");
1670
Writer.
Write
(specifiedPosition.ToString(CultureInfo.InvariantCulture));
1671
Writer.
Write
(" || ");
1672
Writer.
Write
(specifiedSource);
1711
Writer.
Write
("if (pLength > ");
1712
Writer.
Write
(i.ToString(CultureInfo.InvariantCulture));
1717
Writer.
Write
("if (pLength <= ");
1718
Writer.
Write
(specifiedPosition.ToString(CultureInfo.InvariantCulture));
1719
Writer.
Write
(" || ");
1720
Writer.
Write
(specifiedSource);
1746
Writer.
Write
("WriteRpcResult(");
1748
Writer.
Write
(", ");
1771
Writer.
Write
("if (pLength > ");
1772
Writer.
Write
(mapping.Members.Length.ToString(CultureInfo.InvariantCulture));
1793
Writer.
Write
("public void ");
1794
Writer.
Write
(methodName);
1837
Writer.
Write
("void ");
1838
Writer.
Write
(methodName);
1843
Writer.
Write
("string ");
1844
Writer.
Write
(methodName);
1845
Writer.
Write
("(");
1846
Writer.
Write
(mapping.TypeDesc.UseReflection? "object" : fullTypeName );
1864
Writer.
Write
("s = ");
1873
Writer.
Write
("default: s = FromEnum(");
1874
Writer.
Write
(RaCodeGen.GetStringForEnumLongValue("v", mapping.TypeDesc.UseReflection));
1875
Writer.
Write
(", new string[] {");
1883
Writer.
Write
("}, new ");
1884
Writer.
Write
(typeof(long).FullName);
1885
Writer.
Write
("[] {");
1891
Writer.
Write
("(long)");
1893
Writer.
Write
(c.Value.ToString(CultureInfo.InvariantCulture));
1895
Writer.
Write
(fullTypeName);
1896
Writer.
Write
(".@");
1898
Writer.
Write
(c.Name);
1902
Writer.
Write
("}, ");
1907
Writer.
Write
("default: throw CreateInvalidEnumValueException(");
1908
Writer.
Write
(RaCodeGen.GetStringForEnumLongValue("v", mapping.TypeDesc.UseReflection));
1909
Writer.
Write
(".ToString(System.Globalization.CultureInfo.InvariantCulture), ");
1917
Writer.
Write
("WriteXsiType(");
1919
Writer.
Write
(", ");
1934
Writer.
Write
("else if (");
1946
Writer.
Write
(methodName);
1947
Writer.
Write
("(n, ns,");
1948
if(!derived.TypeDesc.UseReflection) Writer.
Write
("("+fullTypeName+")");
1949
Writer.
Write
("o");
1951
Writer.
Write
(", isNullable");
1952
Writer.
Write
(", true");
1968
Writer.
Write
("else if (");
1980
Writer.
Write
("WriteXsiType(");
1982
Writer.
Write
(", ");
1985
Writer.
Write
("Writer.WriteString(");
1986
Writer.
Write
(methodName);
1987
Writer.
Write
("(");
1988
if (!mapping.TypeDesc.UseReflection) Writer.
Write
("("+fullTypeName+")");
1999
Writer.
Write
("else if (");
2008
Writer.
Write
("WriteXsiType(");
2010
Writer.
Write
(", ");
2030
Writer.
Write
("void ");
2031
Writer.
Write
(methodName);
2041
Writer.
Write
("(string n, string ns, ");
2042
Writer.
Write
(mapping.TypeDesc.UseReflection ? "object" : fullTypeName);
2043
Writer.
Write
(" o");
2045
Writer.
Write
(", bool isNullable");
2059
Writer.
Write
(typeof(Type).FullName);
2061
Writer.
Write
("if (");
2102
Writer.
Write
("WriteStartElement(n, ns, o, false, ");
2104
Writer.
Write
("null");
2106
Writer.
Write
(xmlnsSource);
2110
Writer.
Write
("if (needType) WriteXsiType(");
2112
Writer.
Write
(", ");
2125
Writer.
Write
("if (");
2128
Writer.
Write
(methodInvoke);
2133
Writer.
Write
("if (");
2136
Writer.
Write
(memberGet);
2161
Writer.
Write
("if (");
2164
Writer.
Write
(methodInvoke);
2169
Writer.
Write
("if (");
2172
Writer.
Write
(memberGet);
2223
Writer.
Write
("Writer.WriteStartAttribute(null, ");
2225
Writer.
Write
(", ");
2231
Writer.
Write
("null");
2236
Writer.
Write
(typeof(StringBuilder).FullName);
2237
Writer.
Write
(" sb = new ");
2238
Writer.
Write
(typeof(StringBuilder).FullName);
2245
Writer.
Write
(" e = ");
2246
Writer.
Write
(typeof(IEnumerator).FullName);
2248
Writer.
Write
("((");
2249
Writer.
Write
(typeof(IEnumerable).FullName);
2255
Writer.
Write
("(");
2256
Writer.
Write
(typeof(IEnumerator).FullName);
2257
Writer.
Write
(")");
2258
Writer.
Write
(RaCodeGen.GetReflectionVariable(memberTypeDesc.CSharpName, "System.Collections.Generic.IEnumerable*"));
2262
Writer.
Write
("((System.Collections.Generic.IEnumerable<");
2263
Writer.
Write
(arrayElementTypeDesc.CSharpName);
2269
Writer.
Write
("(");
2270
Writer.
Write
(typeof(IEnumerator).FullName);
2271
Writer.
Write
(")");
2273
Writer.
Write
(RaCodeGen.GetStringForMethodInvoke("a", memberTypeDesc.CSharpName, "GetEnumerator", memberTypeDesc.UseReflection));
2284
Writer.
Write
("for (int i = 0; i < ");
2289
Writer.
Write
("((");
2290
Writer.
Write
(typeof(ICollection).FullName);
2301
Writer.
Write
("WriteValue(");
2305
Writer.
Write
("sb.Append(");
2327
Writer.
Write
("WriteAttribute(");
2329
Writer.
Write
(", ");
2333
Writer.
Write
(", ");
2357
Writer.
Write
("WriteXmlAttribute(");
2358
Writer.
Write
(source);
2359
Writer.
Write
(", ");
2360
Writer.
Write
(parent);
2400
Writer.
Write
("throw CreateInvalidChoiceIdentifierValueException(");
2402
Writer.
Write
(", ");
2404
Writer.
Write
(");");
2422
Writer.
Write
(typeof(IEnumerator).FullName);
2423
Writer.
Write
(" e = ");
2425
Writer.
Write
("((");
2426
Writer.
Write
(typeof(IEnumerable).FullName);
2427
Writer.
Write
(")");
2428
Writer.
Write
(arrayName);
2434
Writer.
Write
("(");
2435
Writer.
Write
(typeof(IEnumerator).FullName);
2436
Writer.
Write
(")");
2437
Writer.
Write
(RaCodeGen.GetReflectionVariable(arrayTypeDesc.CSharpName, "System.Collections.Generic.IEnumerable*"));
2438
Writer.
Write
(".Invoke(");
2439
Writer.
Write
(arrayName);
2443
Writer.
Write
("((System.Collections.Generic.IEnumerable<");
2444
Writer.
Write
(arrayElementTypeDesc.CSharpName);
2445
Writer.
Write
(">)");
2446
Writer.
Write
(arrayName);
2452
Writer.
Write
("(");
2453
Writer.
Write
(typeof(IEnumerator).FullName);
2454
Writer.
Write
(")");
2456
Writer.
Write
(RaCodeGen.GetStringForMethodInvoke(arrayName, arrayTypeDesc.CSharpName, "GetEnumerator", arrayTypeDesc.UseReflection));
2467
Writer.
Write
("for (int i");
2468
Writer.
Write
(arrayName);
2469
Writer.
Write
(" = 0; i");
2470
Writer.
Write
(arrayName);
2471
Writer.
Write
(" < ");
2473
Writer.
Write
(arrayName);
2474
Writer.
Write
(".Length");
2477
Writer.
Write
("((");
2478
Writer.
Write
(typeof(ICollection).FullName);
2479
Writer.
Write
(")");
2480
Writer.
Write
(arrayName);
2481
Writer.
Write
(").Count");
2483
Writer.
Write
("; i");
2484
Writer.
Write
(arrayName);
2519
Writer.
Write
("if ((object)(");
2520
Writer.
Write
(source);
2521
Writer.
Write
(") != null)");
2547
if (wroteFirstIf) Writer.
Write
("else ");
2549
Writer.
Write
("if (");
2550
Writer.
Write
(enumUseReflection?RaCodeGen.GetStringForEnumLongValue(enumSource, enumUseReflection):enumSource);
2551
Writer.
Write
(" == ");
2552
Writer.
Write
(enumFullName);
2554
Writer.
Write
(" && ((object)(");
2555
Writer.
Write
(source);
2556
Writer.
Write
(") != null)");
2574
if (wroteFirstIf) Writer.
Write
("else ");
2576
Writer.
Write
("if (");
2589
if (elements.Length - anyCount > 0) Writer.
Write
("else ");
2593
Writer.
Write
("if (");
2594
Writer.
Write
(source);
2595
Writer.
Write
(" is ");
2596
Writer.
Write
(fullTypeName);
2600
Writer.
Write
(fullTypeName);
2601
Writer.
Write
(" elem = (");
2602
Writer.
Write
(fullTypeName);
2603
Writer.
Write
(")");
2604
Writer.
Write
(source);
2610
if (c++ > 0) Writer.
Write
("else ");
2618
Writer.
Write
("if (");
2619
Writer.
Write
(enumUseReflection?RaCodeGen.GetStringForEnumLongValue(enumSource, enumUseReflection):enumSource);
2620
Writer.
Write
(" == ");
2621
Writer.
Write
(enumFullName);
2623
Writer.
Write
(" && ((object)(");
2624
Writer.
Write
(source);
2625
Writer.
Write
(") != null)");
2630
Writer.
Write
("if (elem.Name == ");
2632
Writer.
Write
(" && elem.NamespaceURI == ");
2646
Writer.
Write
("throw CreateChoiceIdentifierValueException(");
2648
Writer.
Write
(", ");
2678
Writer.
Write
("else ");
2679
Writer.
Write
("if (");
2698
Writer.
Write
("else ");
2701
Writer.
Write
(" if ((object)(");
2702
Writer.
Write
(source);
2703
Writer.
Write
(") != null)");
2709
Writer.
Write
("throw CreateUnknownTypeException(");
2710
Writer.
Write
(source);
2724
Writer.
Write
("WriteValue(");
2737
Writer.
Write
(source);
2750
Writer.
Write
("if (");
2751
Writer.
Write
(source);
2774
Writer.
Write
("WritePotentiallyReferencingElement(");
2776
Writer.
Write
(", ");
2778
Writer.
Write
(", ");
2779
Writer.
Write
(source);
2781
Writer.
Write
(", ");
2782
Writer.
Write
(RaCodeGen.GetStringForTypeof(mapping.TypeDesc.CSharpName, mapping.TypeDesc.UseReflection));
2783
Writer.
Write
(", true, ");
2786
Writer.
Write
(", null, false, ");
2804
Writer.
Write
("if (");
2805
Writer.
Write
(elementArrayName);
2806
Writer.
Write
(" != null)");
2812
Writer.
Write
("for (int ");
2813
Writer.
Write
(arrayIndex);
2814
Writer.
Write
(" = 0; ");
2815
Writer.
Write
(arrayIndex);
2816
Writer.
Write
(" < ");
2819
Writer.
Write
(elementArrayName);
2820
Writer.
Write
(".Length");
2823
Writer.
Write
("((");
2824
Writer.
Write
(typeof(ICollection).FullName);
2825
Writer.
Write
(")");
2826
Writer.
Write
(elementArrayName);
2827
Writer.
Write
(").Count");
2829
Writer.
Write
("; ");
2830
Writer.
Write
(arrayIndex);
2856
Writer.
Write
("if (");
2857
Writer.
Write
(arrayName);
2858
Writer.
Write
(" != null)");
2875
Writer.
Write
("Writer.WriteStartElement(");
2877
Writer.
Write
(", ");
2880
Writer.
Write
(methodName);
2881
Writer.
Write
("(");
2882
Writer.
Write
(source);
2905
Writer.
Write
("WritePotentiallyReferencingElement(");
2907
Writer.
Write
(", ");
2909
Writer.
Write
(", ");
2910
Writer.
Write
(source);
2912
Writer.
Write
(", ");
2913
Writer.
Write
(RaCodeGen.GetStringForTypeof(mapping.TypeDesc.CSharpName, mapping.TypeDesc.UseReflection));
2914
Writer.
Write
(", true, ");
2917
Writer.
Write
(", null, false, ");
2928
Writer.
Write
(methodName);
2929
Writer.
Write
("(");
2931
Writer.
Write
(", ");
2933
Writer.
Write
("null");
2937
Writer.
Write
(", ");
2938
Writer.
Write
(source);
2940
Writer.
Write
(", ");
2943
Writer.
Write
(", false");
2959
Writer.
Write
("if ((");
2960
Writer.
Write
(source);
2961
Writer.
Write
(") is ");
2962
Writer.
Write
(typeof(XmlNode).FullName);
2963
Writer.
Write
(" || ");
2964
Writer.
Write
(source);
2965
Writer.
Write
(" == null");
2976
Writer.
Write
("throw CreateInvalidAnyTypeException(");
2977
Writer.
Write
(source);
2990
Writer.
Write
(func);
2991
Writer.
Write
("((");
2992
Writer.
Write
(cast.FullName);
2993
Writer.
Write
(")");
2994
Writer.
Write
(source);
2995
Writer.
Write
(", ");
2997
Writer.
Write
(", ");
2999
Writer.
Write
(", ");
3001
Writer.
Write
(", ");
3007
Writer.
Write
("if (");
3011
Writer.
Write
("(");
3012
Writer.
Write
(source);
3014
Writer.
Write
(" == null) || (");
3016
Writer.
Write
(" != null) && (");
3017
Writer.
Write
(source);
3018
Writer.
Write
(".Length != 0)");
3021
Writer.
Write
(source);
3022
Writer.
Write
(" != ");
3025
Writer.
Write
(")");
3030
Writer.
Write
("if (((object)");
3031
Writer.
Write
(source);
3032
Writer.
Write
(") != null && !(");
3034
Writer.
Write
(")) throw CreateMismatchChoiceException(");
3036
Writer.
Write
(", ");
3038
Writer.
Write
(", ");
3044
Writer.
Write
("if ((object)(");
3045
Writer.
Write
(source);
3057
Writer.
Write
("null");
3074
Writer.
Write
("\'");
3081
Writer.
Write
(((Int32)value).ToString(null, NumberFormatInfo.InvariantInfo));
3084
Writer.
Write
(((Double)value).ToString("R", NumberFormatInfo.InvariantInfo));
3087
Writer.
Write
((bool)value ? "true" : "false");
3096
Writer.
Write
("(");
3097
Writer.
Write
(type.FullName);
3098
Writer.
Write
(")");
3099
Writer.
Write
("(");
3100
Writer.
Write
(Convert.ToString(value, NumberFormatInfo.InvariantInfo));
3101
Writer.
Write
(")");
3104
Writer.
Write
(((Single)value).ToString("R", NumberFormatInfo.InvariantInfo));
3105
Writer.
Write
("f");
3108
Writer.
Write
(((Decimal)value).ToString(null, NumberFormatInfo.InvariantInfo));
3109
Writer.
Write
("m");
3112
Writer.
Write
(" new ");
3113
Writer.
Write
(type.FullName);
3114
Writer.
Write
("(");
3115
Writer.
Write
(((DateTime)value).Ticks.ToString(CultureInfo.InvariantCulture));
3116
Writer.
Write
(")");
3120
Writer.
Write
(((int)value).ToString(null, NumberFormatInfo.InvariantInfo));
3123
Writer.
Write
(" new ");
3124
Writer.
Write
(type.FullName);
3125
Writer.
Write
("(");
3126
Writer.
Write
(((TimeSpan)value).Ticks.ToString(CultureInfo.InvariantCulture));
3127
Writer.
Write
(")");
3138
Writer.
Write
("WriteNamespaceDeclarations(");
3139
Writer.
Write
(source);
3153
Writer.
Write
("for (int i = ");
3154
Writer.
Write
(loopStartSource);
3155
Writer.
Write
("; i < ");
3156
Writer.
Write
(loopEndSource);
3378
writer.
Write
("static "+typeof(Type).FullName+" "+typeVariable +" = "+assemblyVariable+".GetType(");
3396
writer.
Write
("static "+typeof(Type).FullName+" "+typeVariable +" = "+assemblyVariable+".GetType(");
3419
writer.
Write
(String.Format(CultureInfo.InvariantCulture, helperClassesForUseReflection,
3482
writer.
Write
("static "+ typeof(Assembly).FullName+" "+assemblyVariable+" = "+"ResolveDynamicAssembly(");
3496
writer.
Write
("static XSPropInfo "+propVariable+" = new XSPropInfo("+typeVariable+", ");
3504
writer.
Write
("static XSFieldInfo "+fieldVariable+" = new XSFieldInfo("+typeVariable+", ");
3516
writer.
Write
("static "+typeof(MethodInfo).FullName+" "+methodVariable+" = "+typeVariable+".GetMethod(");
3518
writer.
Write
(", ");
3521
writer.
Write
(bindingFlags);
3522
writer.
Write
(".Public | ");
3523
writer.
Write
(bindingFlags);
3524
writer.
Write
(".Instance | ");
3525
writer.
Write
(bindingFlags);
3526
writer.
Write
(".Static");
3529
writer.
Write
(" | ");
3530
writer.
Write
(bindingFlags);
3531
writer.
Write
(".NonPublic");
3533
writer.
Write
(", null, ");
3534
writer.
Write
("new "+typeof(Type).FullName+"[] { ");
3536
writer.
Write
(paramTypes[i]);
3538
writer.
Write
(", ");
3548
writer.
Write
("static XSArrayInfo ");
3549
writer.
Write
(itemVariable);
3550
writer.
Write
("= new XSArrayInfo(");
3551
writer.
Write
(GetStringForTypeof(CodeIdentifier.GetCSharpName(type), collectionUseReflection));
3552
writer.
Write
(".GetProperty(");
3554
writer.
Write
(",");
3556
writer.
Write
(GetStringForTypeof(CodeIdentifier.GetCSharpName(defaultIndexer.PropertyType), elementUseReflection));
3557
writer.
Write
(",new ");
3558
writer.
Write
(typeof(Type[]).FullName);
3734
writer.
Write
(typeFullName);
3735
writer.
Write
(" ");
3736
writer.
Write
(variableName);
3738
writer.
Write
(" = ");
3740
writer.
Write
("("+typeFullName+")");
3742
writer.
Write
(initValue);
3748
writer.
Write
(useReflection ? "object" : escapedName);
3749
writer.
Write
(" ");
3750
writer.
Write
(source);
3751
writer.
Write
(" = ");
3752
writer.
Write
(GetStringForCreateInstance(escapedName, useReflection, ctorInaccessible, !useReflection && ctorInaccessible));
3757
writer.
Write
(source);
3758
writer.
Write
(" is ");
3759
writer.
Write
(escapedTypeName);
3762
writer.
Write
(GetReflectionVariable(escapedTypeName,null));
3763
writer.
Write
(".IsAssignableFrom(");
3764
writer.
Write
(source);
3765
writer.
Write
(".GetType())");
3778
writer.
Write
(typeName);
3779
writer.
Write
(" ");
3780
writer.
Write
(variableName);
3782
writer.
Write
(" = ");
3784
writer.
Write
("("+typeName+")");
3785
writer.
Write
(initValue);
3790
writer.
Write
("case ");
3792
writer.
Write
(c.Value.ToString(CultureInfo.InvariantCulture));
3795
writer.
Write
(fullTypeName);
3796
writer.
Write
(".@");
3798
writer.
Write
(c.Name);
3800
writer.
Write
(": ");
3803
writer.
Write
(variable);
3804
writer.
Write
(" == ");
3805
writer.
Write
(GetStringForTypeof(escapedTypeName, useReflection));
3809
writer.
Write
(variable);
3810
writer.
Write
(" == typeof(");
3811
writer.
Write
(escapedTypeName);
3812
writer.
Write
(")");
3815
writer.
Write
(variable);
3816
writer.
Write
(".IsArray ");
3817
writer.
Write
(" && ");
3823
writer.
Write
("null");
3826
writer.
Write
("@\"");
3831
writer.
Write
("\\r");
3833
writer.
Write
("\\n");
3835
writer.
Write
("\\t");
3838
writer.
Write
("\\x");
3844
writer.
Write
("\"\"");
3850
writer.
Write
("\"");