//public string ReturnType { get; } private MethodSyntax(string methodName, IReadOnlyList <MethodParameterSyntax> parameters, BodySyntax methodBody) { MethodName = methodName ?? throw new ArgumentNullException(nameof(methodName)); Parameters = parameters ?? throw new ArgumentNullException(nameof(parameters)); MethodBody = methodBody ?? throw new ArgumentNullException(nameof(methodBody)); MethodID = new MethodID(MethodName, Parameters); }
public MethodSyntax WithBody(BodySyntax methodBody) => new MethodSyntax(MethodName, Parameters, methodBody);