Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
csharpier.1.0.3.nupkg | 2025-06-29 | 12.5 MB | |
1.0.3 source code.tar.gz | 2025-06-29 | 892.0 kB | |
1.0.3 source code.zip | 2025-06-29 | 1.3 MB | |
README.md | 2025-06-29 | 2.5 kB | |
Totals: 4 Items | 14.7 MB | 0 |
What's Changed
Switch block case with conditionals adding newlines #1630
Switch blocks were breaking on conditions within patterns.
:::c#
// input and expected output
switch ("")
{
case "" or "":
break;
}
// 1.0.2
switch ("")
{
case ""
or "":
break;
}
switch expression formatting adds odd newlines #1620
CSharpier was breaking after a discard with a when, resulting in extra new lines
:::c#
// input and expected output
_ = someValue switch
{
_ when KeepWhenWithDiscard() => "",
_ when KeepWhenWithDiscard_________________(
SomeObject_______________________________________________
) => "",
_ when KeepWhenWithDiscard_________________(
SomeObject_______________________________________________
) => "LongString_____________________________________________________________________",
};
// 1.0.2
_ = someValue switch
{
_ when KeepWhenWithDiscard() => "",
_
when KeepWhenWithDiscard_________________(
SomeObject_______________________________________________
) => "",
_
when KeepWhenWithDiscard_________________(
SomeObject_______________________________________________
) => "LongString_____________________________________________________________________",
};
multi-line raw string in linq query causes a subsequent linq query to be printed on one line #1617
If a query syntax linq expression contained a raw string, it could result in method invocations not breaking.
:::c#
// input and expected output
(
from x in SomeMethod()
select """
someString
"""
)
.CallMethod_____________________________________________()
.CallMethod_____________________________________________();
// 1.0.2
(
from x in SomeMethod()
select """
someString
"""
).CallMethod_____________________________________________().CallMethod_____________________________________________();
Full Changelog: https://github.com/belav/csharpier/compare/1.0.2...1.0.3