예제 #1
0
        //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);
        }
예제 #2
0
 public MethodSyntax WithBody(BodySyntax methodBody)
 => new MethodSyntax(MethodName, Parameters, methodBody);