Skip to content

Commit

Permalink
Put constructor initializer on new line (#782)
Browse files Browse the repository at this point in the history
closes #526
  • Loading branch information
belav authored Jan 9, 2023
1 parent b4fa898 commit ccff28f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ public class BasicClass

public class Initializers : BasicClass
{
public Initializers() : this(true) { }
public Initializers()
: this(true) { }

public Initializers(string value) : base(value) { }
public Initializers(string value)
: base(value) { }

public Initializers(
string longParameter_______________________________________________________________________________
Expand All @@ -46,11 +48,13 @@ public class Initializers : BasicClass

public Initializers(
string longParameter____________________________________________________________
) : base(false) { }
)
: base(false) { }

public Initializers(
string longParameter____________________________________________________________
) : base(false)
)
: base(false)
{
WithBody();
}
Expand Down Expand Up @@ -94,9 +98,11 @@ public class Initializers : BasicClass
public LongParametersWithEmptyBody(string parameter, bool anotherParameter__________________)
{ }

public LongInitializerWithEmptyBody() : base(parameter, anotherParameter___________________) { }
public LongInitializerWithEmptyBody()
: base(parameter, anotherParameter___________________) { }

public LongInitializerWithEmptyBody() : base(parameter, anotherParameter__________________) { }
public LongInitializerWithEmptyBody()
: base(parameter, anotherParameter__________________) { }

public LongInitializerWithEmptyBody()
: base(parameter______________, anotherParameter___________________________________________)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ operatorDeclarationSyntax.ExplicitInterfaceSpecifier is not null

declarationGroup.Add(
Doc.Group(
Doc.Indent(Doc.Line),
Doc.Indent(Doc.HardLine),
Doc.Indent(colonToken),
Token.Print(constructorInitializer.ThisOrBaseKeyword, context),
Doc.Indent(argumentList)
Expand Down

0 comments on commit ccff28f

Please sign in to comment.