csharp_place_method_attribute_on_same_line
Where a method's attribute section goes. if_owner_is_single_line joins it when the method fits on one line. Deterministic mode only.
| Value | Notes |
|---|---|
false |
|
if_owner_is_single_line |
Default: false
No known case where Curb's output is not a fixed point of dotnet format — see conformance.
max_line_length = 80
csharp_place_method_attribute_on_same_line = false
namespace N;
public class Widget
{
[Obsolete]
public void OldWay() => Console.WriteLine("old");
[Obsolete("use NewWay")]
public string OldName { get; set; } = "";
}
namespace N;
public class Widget
{
[Obsolete]
public void OldWay() => Console.WriteLine("old");
[Obsolete("use NewWay")]
public string OldName { get; set; } = "";
}
max_line_length = 80
csharp_place_method_attribute_on_same_line = if_owner_is_single_line
namespace N;
public class Widget
{
[Obsolete]
public void OldWay() => Console.WriteLine("old");
[Obsolete("use NewWay")]
public string OldName { get; set; } = "";
}
namespace N;
public class Widget
{
[Obsolete] public void OldWay() => Console.WriteLine("old");
[Obsolete("use NewWay")]
public string OldName { get; set; } = "";
}