Skip to content

Instantly share code, notes, and snippets.

@JohanLarsson
Created August 3, 2019 20:17
Show Gist options
  • Save JohanLarsson/60988ea5b5f0f07a9791c67ccd8ad1cd to your computer and use it in GitHub Desktop.
Save JohanLarsson/60988ea5b5f0f07a9791c67ccd8ad1cd to your computer and use it in GitHub Desktop.
SyntaxFactory.MethodDeclaration(
attributeLists: default,
modifiers: default,
returnType: SyntaxFactory.PredefinedType(
keyword: SyntaxFactory.Token(
leading: default,
kind: SyntaxKind.VoidKeyword,
trailing: SyntaxFactory.TriviaList(SyntaxFactory.Space))),
explicitInterfaceSpecifier: default,
identifier: SyntaxFactory.Identifier(
leading: default,
text: "M",
trailing: default),
typeParameterList: default,
parameterList: SyntaxFactory.ParameterList(
openParenToken: SyntaxFactory.Token(SyntaxKind.OpenParenToken),
parameters: SyntaxFactory.SeparatedList(
new ParameterSyntax[]
{
SyntaxFactory.Parameter(
attributeLists: default,
modifiers: default,
type: SyntaxFactory.PredefinedType(
keyword: SyntaxFactory.Token(
leading: default,
kind: SyntaxKind.IntKeyword,
trailing: SyntaxFactory.TriviaList(SyntaxFactory.Space))),
identifier: SyntaxFactory.Identifier(
leading: default,
text: "x",
trailing: default),
@default: default),
SyntaxFactory.Parameter(
attributeLists: default,
modifiers: default,
type: SyntaxFactory.PredefinedType(
keyword: SyntaxFactory.Token(
leading: default,
kind: SyntaxKind.IntKeyword,
trailing: SyntaxFactory.TriviaList(SyntaxFactory.Space))),
identifier: SyntaxFactory.Identifier(
leading: default,
text: "y",
trailing: default),
@default: default),
},
new SyntaxToken[]
{
SyntaxFactory.Token(
leading: default,
kind: SyntaxKind.CommaToken,
trailing: SyntaxFactory.TriviaList(SyntaxFactory.Space)),
}),
closeParenToken: SyntaxFactory.Token(
leading: default,
kind: SyntaxKind.CloseParenToken,
trailing: SyntaxFactory.TriviaList(SyntaxFactory.Space))),
constraintClauses: default,
body: SyntaxFactory.Block(
openBraceToken: SyntaxFactory.Token(
leading: default,
kind: SyntaxKind.OpenBraceToken,
trailing: SyntaxFactory.TriviaList(SyntaxFactory.Space)),
statements: default,
closeBraceToken: SyntaxFactory.Token(SyntaxKind.CloseBraceToken)),
expressionBody: default,
semicolonToken: default)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment