예제 #1
0
 public TrackingVariableWriter(GeneratedMethod method)
 {
     this._method = method;
 }
예제 #2
0
 /// <summary>
 /// Writes a "return [variable.Usage];" code snippet .
 /// </summary>
 /// <param name="writer">Where to write to.</param>
 /// <param name="method">The method the return statement belongs to.</param>
 /// <param name="variable">The variable to return.</param>
 public static void Return(this ISourceWriter writer, GeneratedMethod method, Variable variable)
 {
     writer.WriteLine(method.AsyncMode == AsyncMode.AsyncTask
         ? $"return {variable.Usage};"
         : string.Format(_returnFromResult, variable.Usage));
 }
예제 #3
0
 public MethodSourceWriter(IMethodVariables variables, GeneratedMethod method, ISourceWriter inner)
 {
     this._variables = variables;
     this._method    = method;
     this._inner     = inner;
 }