Microsoft\CSharp\CSharpCodeGenerator.cs (333)
204private void ContinueOnNewLine(string st) => Output.WriteLine(st);
206private void OutputIdentifier(string ident) => Output.Write(CreateEscapedIdentifier(ident));
208private void OutputType(CodeTypeReference typeRef) => Output.Write(GetTypeOutput(typeRef));
212Output.Write("new ");
223Output.Write("[]");
225Output.WriteLine(" {");
229Output.Write('}');
233Output.Write(GetBaseTypeOutput(e.CreateType));
235Output.Write('[');
242Output.Write(e.Size);
244Output.Write(']');
249Output.Write("[]");
254private void GenerateBaseReferenceExpression() => Output.Write("base");
259Output.Write('(');
262Output.Write(' ');
280Output.Write(' ');
283Output.Write(')');
293Output.Write("((");
295Output.Write(")(");
297Output.Write("))");
325Output.Write("default(");
327Output.Write(')');
332Output.Write("new ");
334Output.Write('(');
336Output.Write('.');
338Output.Write(')');
351Output.WriteLine();
380Output.WriteLine();
404Output.Write('.');
418Output.Write('[');
428Output.Write(", ");
432Output.Write(']');
438Output.Write('[');
448Output.Write(", ");
452Output.Write(']');
460Output.WriteLine(e.Value);
471Output.Write(e.Value);
477Output.Write('(');
479Output.Write(')');
488Output.Write('(');
490Output.Write(')');
496Output.Write('.');
502Output.Write(GetTypeArgumentsOutput(e.TypeArguments));
526Output.WriteLine();
652Output.Write('.');
663Output.Write('(');
665Output.Write(')');
670Output.Write("new ");
672Output.Write('(');
674Output.Write(')');
686Output.Write(((sbyte)e.Value).ToString(CultureInfo.InvariantCulture));
692Output.Write(((ushort)e.Value).ToString(CultureInfo.InvariantCulture));
696Output.Write(((uint)e.Value).ToString(CultureInfo.InvariantCulture));
697Output.Write('u');
701Output.Write(((ulong)e.Value).ToString(CultureInfo.InvariantCulture));
702Output.Write("ul");
706Output.Write(NullToken);
710Output.Write(QuoteSnippetString((string)e.Value));
714Output.Write(((byte)e.Value).ToString(CultureInfo.InvariantCulture));
718Output.Write(((short)e.Value).ToString(CultureInfo.InvariantCulture));
722Output.Write(((int)e.Value).ToString(CultureInfo.InvariantCulture));
726Output.Write(((long)e.Value).ToString(CultureInfo.InvariantCulture));
744Output.Write("true");
748Output.Write("false");
759Output.Write('\'');
763Output.Write("\\r");
766Output.Write("\\t");
769Output.Write("\\\"");
772Output.Write("\\\'");
775Output.Write("\\\\");
778Output.Write("\\0");
781Output.Write("\\n");
797Output.Write(c);
801Output.Write('\'');
808Output.Write("\\u");
809Output.Write(((int)value).ToString("X4"));
819Output.Write("value");
822Output.Write("this");
829Output.WriteLine(';');
836Output.Write("for (");
838Output.Write("; ");
840Output.Write("; ");
842Output.Write(')');
848Output.WriteLine('}');
853Output.Write("throw");
856Output.Write(' ');
859Output.WriteLine(';');
865Output.Write(commentLineStart);
866Output.Write(' ');
876Output.Write(' ');
885Output.Write(value[i]);
891Output.Write('\n');
895Output.Write(commentLineStart);
901Output.Write(commentLineStart);
906Output.Write(commentLineStart);
910Output.WriteLine();
932Output.Write("return");
935Output.Write(' ');
938Output.WriteLine(';');
943Output.Write("if (");
945Output.Write(')');
954Output.Write('}');
957Output.Write(' ');
961Output.WriteLine();
963Output.Write("else");
969Output.WriteLine('}');
974Output.Write("try");
984Output.Write('}');
987Output.Write(' ');
991Output.WriteLine();
993Output.Write("catch (");
995Output.Write(' ');
997Output.Write(')');
1008Output.Write('}');
1011Output.Write(' ');
1015Output.WriteLine();
1017Output.Write("finally");
1023Output.WriteLine('}');
1029Output.Write(" = ");
1033Output.WriteLine(';');
1040Output.Write(" += ");
1042Output.WriteLine(';');
1048Output.Write(" -= ");
1050Output.WriteLine(';');
1055Output.WriteLine(e.Value);
1060Output.Write("goto ");
1061Output.Write(e.Label);
1062Output.WriteLine(';');
1068Output.Write(e.Label);
1069Output.WriteLine(':');
1082Output.Write(" = ");
1087Output.WriteLine(';');
1093Output.WriteLine();
1094Output.Write("#line ");
1095Output.Write(e.LineNumber);
1096Output.Write(" \"");
1097Output.Write(e.FileName);
1098Output.Write('\"');
1099Output.WriteLine();
1104Output.WriteLine();
1105Output.WriteLine("#line default");
1106Output.WriteLine("#line hidden");
1122Output.Write("event ");
1129Output.WriteLine(';');
1260Output.Write(" = ");
1263Output.WriteLine(',');
1278Output.Write(" = ");
1281Output.WriteLine(';');
1286Output.Write(e.Text);
1306Output.Write("public static ");
1308Output.Write(" Main()");
1315Output.WriteLine('}');
1328Output.WriteLine();
1382Output.Write(' ');
1385Output.Write(GetBaseTypeOutput(e.PrivateImplementationType, preferBuiltInTypes: false));
1386Output.Write('.');
1392Output.Write('(');
1394Output.Write(')');
1407Output.WriteLine('}');
1411Output.WriteLine(';');
1425Output.WriteLine();
1467Output.Write(' ');
1471Output.Write(GetBaseTypeOutput(e.PrivateImplementationType, preferBuiltInTypes: false));
1472Output.Write('.');
1477Output.Write("this[");
1479Output.Write(']');
1493Output.WriteLine("get;");
1497Output.Write("get");
1502Output.WriteLine('}');
1509Output.WriteLine("set;");
1513Output.Write("set");
1518Output.WriteLine('}');
1523Output.WriteLine('}');
1530Output.Write("float.NaN");
1534Output.Write("float.NegativeInfinity");
1538Output.Write("float.PositiveInfinity");
1542Output.Write(s.ToString(CultureInfo.InvariantCulture));
1543Output.Write('F');
1551Output.Write("double.NaN");
1555Output.Write("double.NegativeInfinity");
1559Output.Write("double.PositiveInfinity");
1563Output.Write(d.ToString("R", CultureInfo.InvariantCulture));
1565Output.Write('D');
1571Output.Write(d.ToString(CultureInfo.InvariantCulture));
1572Output.Write('m');
1580Output.Write("new ");
1590Output.Write("internal ");
1593Output.Write("internal "); /*FamANDAssem*/
1596Output.Write("protected ");
1599Output.Write("protected internal ");
1602Output.Write("private ");
1605Output.Write("public ");
1615Output.Write("abstract ");
1618Output.Write("");
1621Output.Write("static ");
1624Output.Write("override ");
1632Output.Write("virtual ");
1647Output.Write('+');
1650Output.Write('-');
1653Output.Write('*');
1656Output.Write('/');
1659Output.Write('%');
1662Output.Write('=');
1665Output.Write("!=");
1668Output.Write("==");
1671Output.Write("==");
1674Output.Write('|');
1677Output.Write('&');
1680Output.Write("||");
1683Output.Write("&&");
1686Output.Write('<');
1689Output.Write("<=");
1692Output.Write('>');
1695Output.Write(">=");
1707Output.Write("static ");
1710Output.Write("const ");
1722Output.Write('.');
1737Output.WriteLine();
1767Output.Write('(');
1769Output.Write(')');
1776Output.WriteLine(" : ");
1779Output.Write("base(");
1781Output.Write(')');
1788Output.WriteLine(" : ");
1791Output.Write("this(");
1793Output.Write(')');
1802Output.WriteLine('}');
1813Output.Write("static ");
1814Output.Write(CurrentTypeName);
1815Output.Write("()");
1820Output.WriteLine('}');
1828Output.Write("typeof(");
1830Output.Write(')');
1891Output.WriteLine();
1909Output.Write("public ");
1917Output.Write("delegate ");
1919Output.Write(' ');
1921Output.Write('(');
1923Output.WriteLine(");");
1937Output.Write(" : ");
1942Output.Write(", ");
1958Output.WriteLine();
2031Output.WriteLine();
2055Output.WriteLine();
2086Output.WriteLine();
2119Output.WriteLine();
2131Output.WriteLine();
2152Output.Write('=');
2164Output.Write("out ");
2167Output.Write("ref ");
2192Output.Write(", ");
2215Output.Write(", ");
2232Output.Write(' ');
2243Output.Write('<');
2253Output.Write(", ");
2259Output.Write(' ');
2262Output.Write(typeParameters[i].Name);
2265Output.Write('>');
2287Output.WriteLine();
2288Output.Write("where ");
2289Output.Write(typeParameters[i].Name);
2290Output.Write(" : ");
2295Output.Write(", ");
2305Output.WriteLine();
2306Output.Write("where ");
2307Output.Write(typeParameters[i].Name);
2308Output.Write(" : new()");
2312Output.Write(", new ()");
2324Output.Write("new ");
2332Output.Write("public ");
2335Output.Write("private ");
2338Output.Write("protected ");
2343Output.Write("internal ");
2346Output.Write("protected internal ");
2354Output.Write("partial ");
2356Output.Write("struct ");
2360Output.Write("enum ");
2369Output.Write("sealed ");
2373Output.Write("abstract ");
2377Output.Write("partial ");
2380Output.Write("class ");
2386Output.Write("partial ");
2388Output.Write("interface ");
2399Output.WriteLine('}');
2407Output.Write("namespace ");
2413Output.Write('.');
2435Output.WriteLine("//------------------------------------------------------------------------------");
2436Output.Write("// <");
2437Output.WriteLine(SR.AutoGen_Comment_Line1);
2438Output.Write("// ");
2439Output.WriteLine(SR.AutoGen_Comment_Line2);
2440Output.WriteLine("//");
2441Output.Write("// ");
2442Output.WriteLine(SR.AutoGen_Comment_Line4);
2443Output.Write("// ");
2444Output.WriteLine(SR.AutoGen_Comment_Line5);
2445Output.Write("// </");
2446Output.WriteLine(SR.AutoGen_Comment_Line1);
2447Output.WriteLine("//------------------------------------------------------------------------------");
2448Output.WriteLine();
2472Output.Write("using ");
2474Output.WriteLine(';');
2478Output.WriteLine();
2485Output.WriteLine();
2521Output.Write("#pragma checksum \"");
2522Output.Write(checksumPragma.FileName);
2523Output.Write("\" \"");
2524Output.Write(checksumPragma.ChecksumAlgorithmId.ToString("B", CultureInfo.InvariantCulture));
2525Output.Write("\" \"");
2530Output.Write(b.ToString("X2"));
2533Output.WriteLine("\"");
2540Output.Write("#region ");
2541Output.WriteLine(regionDirective.RegionText);
2545Output.WriteLine("#endregion");
2554Output.WriteLine('}');
2560Output.Write("using ");
2562Output.WriteLine(';');
2566Output.Write('[');
2569Output.Write(']');
2600Output.Write(prefix);
2605Output.Write(GetTypeOutput(current.AttributeType));
2607Output.Write('(');
2618Output.Write(", ");
2624Output.Write(')');
2628Output.Write(' ');
2632Output.WriteLine();
2640Output.Write(prefix);
2642Output.Write("params");
2646Output.Write(' ');
2650Output.WriteLine();
2894Output.WriteLine();
2895Output.WriteLine('{');
2899Output.WriteLine(" {");