2 writes to _w
dotnet-svcutil-lib (2)
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (2)
381_w = autoGenWriter.OpenIndented(); 444_w = autoGenWriter.OpenIndented();
90 references to _w
dotnet-svcutil-lib (90)
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (90)
394_w.WriteLine("protected static readonly Type " + ClrTypeName(t) + "Type = typeof(" + ClrTypeToCSharpName(t) + ");"); 396_w.WriteLine(); 407_w.Write("return (" + ClrTypeToCSharpName(tDst) + ") ChangeType((object) value, "); 410_w.Write("destinationType"); 412_w.Write(ClrTypeName(tDst) + "Type"); 414_w.WriteLine(", " + (MethodHasResolver(tSrc, tDst) ? "nsResolver" : "null") + "); }"); 419_w.WriteLine("public override string ToString(string value) {return this.ToString(value, null); }"); 420_w.WriteLine("public override string ToString(object value) {return this.ToString(value, null); }"); 425_w.WriteLine("public override object ChangeType(string value, Type destinationType) {return this.ChangeType(value, destinationType, null); }"); 426_w.WriteLine("public override object ChangeType(object value, Type destinationType) {return this.ChangeType(value, destinationType, null); }"); 429_w.WriteLine(); 452_w.WriteLine(); 453_w.WriteLine("//-----------------------------------------------"); 454_w.WriteLine("// To" + ClrTypeName(tDst)); 455_w.WriteLine("//-----------------------------------------------"); 456_w.WriteLine(); 486_w.WriteLine("Type sourceType = value.GetType();"); 487_w.WriteLine(); 493_w.WriteLine(); 494_w.Write("return (" + ClrTypeToCSharpName(tDst) + ") "); 495_w.Write(group.FindUniqueSourceTypes(typeof(object)).Count > 0 ? "ChangeTypeWildcardDestination" : "ChangeListType"); 496_w.WriteLine("(value, " + ClrTypeName(tDst) + "Type, " + (MethodHasResolver(typeof(object), tDst) ? "nsResolver);" : "null);")); 502_w.WriteLine("// This converter does not support conversions to " + ClrTypeName(tDst) + "."); 505_w.WriteLine(); 508_w.WriteLine(); 509_w.WriteLine("//-----------------------------------------------"); 510_w.WriteLine("// ChangeType"); 511_w.WriteLine("//-----------------------------------------------"); 512_w.WriteLine(); 527_w.WriteLine("if (destinationType == ObjectType) destinationType = DefaultClrType;"); 533_w.WriteLine(); 535_w.Write("return ChangeTypeWildcardSource(value, destinationType, "); 537_w.Write("return ChangeListType(value, destinationType, "); 539_w.WriteLine(MethodHasResolver(typeof(object), tSrc) ? "nsResolver);" : "null);"); 543_w.WriteLine(); 550_w.WriteLine("Type sourceType = value.GetType();"); 551_w.WriteLine(); 554_w.WriteLine("if (destinationType == ObjectType) destinationType = DefaultClrType;"); 580_w.Write("if (destinationType == " + ClrTypeName(tDst) + "Type) "); 581_w.WriteLine("return this.To" + ClrTypeName(tDst) + "(value" + (MethodHasResolver(tDst, tDst) ? ", nsResolver);" : ");")); 585_w.WriteLine("if (destinationType == " + ClrTypeName(tDst) + "Type) {"); 586_w.Indent++; 593_w.Indent--; 594_w.WriteLine("}"); 607_w.WriteLine(); 608_w.WriteLine("return ChangeListType(value, destinationType, nsResolver);"); 617_w.WriteLine(); 618_w.WriteLine(); 619_w.WriteLine("//-----------------------------------------------"); 620_w.WriteLine("// Helpers"); 621_w.WriteLine("//-----------------------------------------------"); 622_w.WriteLine(); 627_w.WriteLine("private object ChangeTypeWildcardDestination(object value, Type destinationType, IXmlNamespaceResolver nsResolver) {"); 628_w.Indent++; 630_w.WriteLine("Type sourceType = value.GetType();"); 631_w.WriteLine(); 636_w.WriteLine(); 637_w.WriteLine("return ChangeListType(value, destinationType, nsResolver);"); 639_w.Indent--; 640_w.WriteLine("}"); 646_w.WriteLine("private object ChangeTypeWildcardSource(object value, Type destinationType, IXmlNamespaceResolver nsResolver) {"); 647_w.Indent++; 652_w.WriteLine(); 653_w.WriteLine("return ChangeListType(value, destinationType, nsResolver);"); 655_w.Indent--; 656_w.WriteLine("}"); 668_w.WriteLine(); 669_w.Indent++; 673_w.WriteLine("if (value == null) throw new ArgumentNullException(\"value\");"); 676_w.WriteLine(); 681_w.WriteLine("if (destinationType == null) throw new ArgumentNullException(\"destinationType\");"); 682_w.WriteLine(); 705_w.Write("public override " + ClrTypeToCSharpName(typeDst) + " " + methName + "(" + methSig + ") {"); 710_w.Indent--; 711_w.WriteLine("}"); 746_w.WriteLine("switch (TypeCode) {"); 755_w.Indent++; 756_w.WriteLine("case XmlTypeCode." + ruleSwitch.XmlType + ": return " + ruleSwitch.ConversionExpression + ";"); 757_w.Indent--; 761_w.WriteLine("if (TypeCode == XmlTypeCode." + ruleSwitch.XmlType + ") return " + ruleSwitch.ConversionExpression + ";"); 768_w.WriteLine("}"); 773_w.WriteLine("return " + defaultRule.ConversionExpression + ";"); 799_w.Write("if (destinationType == " + ClrTypeName(tDst) + "Type) "); 801_w.Write("if (" + GenerateSourceTypeMatch(tSrc) + ") "); 806_w.Write("return this.To" + ClrTypeName(tDst) + "((" + ClrTypeToCSharpName(tSrc) + ") value"); 807_w.WriteLine(MethodHasResolver(tSrc, tDst) ? ", nsResolver);" : ");"); 818_w.WriteLine("{"); 819_w.Indent++; 823_w.Indent--; 824_w.WriteLine("}");