Exemplo n.º 1
0
 /// <summary>
 /// Creates an instance of the Method class.
 /// </summary>
 /// <param name="name">The method name.</param>
 /// <param name="path">The method path.</param>
 /// <param name="httpMethod">The method's HTTP verb.</param>
 /// <param name="returnType">The method return type.</param>
 /// <param name="parameters">The method parameters.</param>
 public Method(
     String name,
     String path,
     HttpMethod httpMethod,
     TaskTypeReference returnType,
     MethodParameter[] parameters)
 {
     this.Name       = name;
     this.Path       = path;
     this.HttpMethod = httpMethod;
     this.ReturnType = returnType;
     this.Parameters = parameters;
 }
 private TypeArgumentListSyntax EmitGetJsonParameters(TaskTypeReference returnType) =>
 TypeArgumentList(
 private MemberAccessExpressionSyntax EmitDoGetRequestWithJsonResponseAccess(TaskTypeReference returnType) =>
 MemberAccessExpression(
     SyntaxKind.SimpleMemberAccessExpression,
     ThisExpression(),
     GenericName(Identifier("DoGetRequestWithJsonResponse"))
     .WithTypeArgumentList(this.EmitGetJsonParameters(returnType)));