Example #1
0
 public override void WriteTo(ITextOutput output, ILAstWritingOptions options)
 {
     output.Write("using (");
     Variable.WriteTo(output);
     output.Write(" = ");
     ResourceExpression.WriteTo(output, options);
     output.WriteLine(") {");
     output.Indent();
     Body.WriteTo(output, options);
     output.Unindent();
     output.WriteLine();
     output.Write("}");
 }
Example #2
0
 public override void WriteTo(ITextOutput output, ILAstWritingOptions options)
 {
     WriteILRange(output, options);
     output.Write("using");
     if (IsAsync)
     {
         output.Write(".async");
     }
     if (IsRefStruct)
     {
         output.Write(".ref");
     }
     output.Write(" (");
     Variable.WriteTo(output);
     output.Write(" = ");
     ResourceExpression.WriteTo(output, options);
     output.WriteLine(") {");
     output.Indent();
     Body.WriteTo(output, options);
     output.Unindent();
     output.WriteLine();
     output.Write("}");
 }