Skip to content

Commit f30fd59

Browse files
committed
code_style: use static lambda
Signed-off-by: leo <longshuang@msn.cn>
1 parent 3918ff2 commit f30fd59

41 files changed

Lines changed: 227 additions & 227 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎src/Views/AIAssistant.axaml.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ protected override void ColorizeLine(DocumentLine line)
3434
public static readonly DirectProperty<AIResponseView, string> ContentProperty =
3535
AvaloniaProperty.RegisterDirect<AIResponseView, string>(
3636
nameof(Content),
37-
o => o.Content,
38-
(o, v) => o.Content = v);
37+
static o => o.Content,
38+
static (o, v) => o.Content = v);
3939

4040
public string Content
4141
{

‎src/Views/Avatar.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public class Avatar : Control, Models.IAvatarHost
2020
public static readonly DirectProperty<Avatar, Models.User> UserProperty =
2121
AvaloniaProperty.RegisterDirect<Avatar, Models.User>(
2222
nameof(User),
23-
o => o.User,
24-
(o, v) => o.User = v);
23+
static o => o.User,
24+
static (o, v) => o.User = v);
2525

2626
public Models.User User
2727
{
@@ -32,8 +32,8 @@ public Models.User User
3232
public static readonly DirectProperty<Avatar, bool> UseGitHubStyleAvatarProperty =
3333
AvaloniaProperty.RegisterDirect<Avatar, bool>(
3434
nameof(UseGitHubStyleAvatar),
35-
o => o.UseGitHubStyleAvatar,
36-
(o, v) => o.UseGitHubStyleAvatar = v);
35+
static o => o.UseGitHubStyleAvatar,
36+
static (o, v) => o.UseGitHubStyleAvatar = v);
3737

3838
public bool UseGitHubStyleAvatar
3939
{

‎src/Views/BisectStateIndicator.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public IBrush Foreground
2929
public static readonly DirectProperty<BisectStateIndicator, Models.Bisect> BisectProperty =
3030
AvaloniaProperty.RegisterDirect<BisectStateIndicator, Models.Bisect>(
3131
nameof(Bisect),
32-
o => o.Bisect,
33-
(o, v) => o.Bisect = v);
32+
static o => o.Bisect,
33+
static (o, v) => o.Bisect = v);
3434

3535
public Models.Bisect Bisect
3636
{

‎src/Views/Blame.axaml.cs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ public void Draw(TextView textView, DrawingContext drawingContext)
316316
public static readonly DirectProperty<BlameTextEditor, string> FileProperty =
317317
AvaloniaProperty.RegisterDirect<BlameTextEditor, string>(
318318
nameof(File),
319-
o => o.File,
320-
(o, v) => o.File = v);
319+
static o => o.File,
320+
static (o, v) => o.File = v);
321321

322322
public string File
323323
{
@@ -328,8 +328,8 @@ public string File
328328
public static readonly DirectProperty<BlameTextEditor, Models.BlameData> BlameDataProperty =
329329
AvaloniaProperty.RegisterDirect<BlameTextEditor, Models.BlameData>(
330330
nameof(BlameData),
331-
o => o.BlameData,
332-
(o, v) => o.BlameData = v);
331+
static o => o.BlameData,
332+
static (o, v) => o.BlameData = v);
333333

334334
public Models.BlameData BlameData
335335
{
@@ -340,8 +340,8 @@ public Models.BlameData BlameData
340340
public static readonly DirectProperty<BlameTextEditor, int> TabWidthProperty =
341341
AvaloniaProperty.RegisterDirect<BlameTextEditor, int>(
342342
nameof(TabWidth),
343-
o => o.TabWidth,
344-
(o, v) => o.TabWidth = v);
343+
static o => o.TabWidth,
344+
static (o, v) => o.TabWidth = v);
345345

346346
public int TabWidth
347347
{

‎src/Views/Bookmark.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public class Bookmark : Control
1010
public static readonly DirectProperty<Bookmark, int> ValueProperty =
1111
AvaloniaProperty.RegisterDirect<Bookmark, int>(
1212
nameof(Value),
13-
o => o.Value,
14-
(o, v) => o.Value = v);
13+
static o => o.Value,
14+
static (o, v) => o.Value = v);
1515

1616
public int Value
1717
{

‎src/Views/BookmarkSelector.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public class BookmarkSelector : Control
1313
public static readonly DirectProperty<BookmarkSelector, int> BookmarkProperty =
1414
AvaloniaProperty.RegisterDirect<BookmarkSelector, int>(
1515
nameof(Bookmark),
16-
o => o.Bookmark,
17-
(o, v) => o.Bookmark = v);
16+
static o => o.Bookmark,
17+
static (o, v) => o.Bookmark = v);
1818

1919
public int Bookmark
2020
{

‎src/Views/BranchSelector.axaml.cs‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public class BranchSelectorChoice : TextBlock
1515
public static readonly DirectProperty<BranchSelectorChoice, Models.Branch> BranchProperty =
1616
AvaloniaProperty.RegisterDirect<BranchSelectorChoice, Models.Branch>(
1717
nameof(Branch),
18-
o => o.Branch,
19-
(o, v) => o.Branch = v);
18+
static o => o.Branch,
19+
static (o, v) => o.Branch = v);
2020

2121
public Models.Branch Branch
2222
{
@@ -27,8 +27,8 @@ public Models.Branch Branch
2727
public static readonly DirectProperty<BranchSelectorChoice, bool> UsePureNameProperty =
2828
AvaloniaProperty.RegisterDirect<BranchSelectorChoice, bool>(
2929
nameof(UsePureName),
30-
o => o.UsePureName,
31-
(o, v) => o.UsePureName = v);
30+
static o => o.UsePureName,
31+
static (o, v) => o.UsePureName = v);
3232

3333
public bool UsePureName
3434
{
@@ -60,8 +60,8 @@ public partial class BranchSelector : UserControl
6060
public static readonly DirectProperty<BranchSelector, List<Models.Branch>> BranchesProperty =
6161
AvaloniaProperty.RegisterDirect<BranchSelector, List<Models.Branch>>(
6262
nameof(Branches),
63-
o => o.Branches,
64-
(o, v) => o.Branches = v);
63+
static o => o.Branches,
64+
static (o, v) => o.Branches = v);
6565

6666
public List<Models.Branch> Branches
6767
{
@@ -72,7 +72,7 @@ public List<Models.Branch> Branches
7272
public static readonly DirectProperty<BranchSelector, List<Models.Branch>> VisibleBranchesProperty =
7373
AvaloniaProperty.RegisterDirect<BranchSelector, List<Models.Branch>>(
7474
nameof(VisibleBranches),
75-
o => o.VisibleBranches);
75+
static o => o.VisibleBranches);
7676

7777
public List<Models.Branch> VisibleBranches
7878
{
@@ -83,8 +83,8 @@ public List<Models.Branch> VisibleBranches
8383
public static readonly DirectProperty<BranchSelector, Models.Branch> SelectedBranchProperty =
8484
AvaloniaProperty.RegisterDirect<BranchSelector, Models.Branch>(
8585
nameof(SelectedBranch),
86-
o => o.SelectedBranch,
87-
(o, v) => o.SelectedBranch = v);
86+
static o => o.SelectedBranch,
87+
static (o, v) => o.SelectedBranch = v);
8888

8989
public Models.Branch SelectedBranch
9090
{
@@ -95,8 +95,8 @@ public Models.Branch SelectedBranch
9595
public static readonly DirectProperty<BranchSelector, bool> IsDropDownOpenedProperty =
9696
AvaloniaProperty.RegisterDirect<BranchSelector, bool>(
9797
nameof(IsDropDownOpened),
98-
o => o.IsDropDownOpened,
99-
(o, v) => o.IsDropDownOpened = v);
98+
static o => o.IsDropDownOpened,
99+
static (o, v) => o.IsDropDownOpened = v);
100100

101101
public bool IsDropDownOpened
102102
{
@@ -107,8 +107,8 @@ public bool IsDropDownOpened
107107
public static readonly DirectProperty<BranchSelector, string> SearchFilterProperty =
108108
AvaloniaProperty.RegisterDirect<BranchSelector, string>(
109109
nameof(SearchFilter),
110-
o => o.SearchFilter,
111-
(o, v) => o.SearchFilter = v);
110+
static o => o.SearchFilter,
111+
static (o, v) => o.SearchFilter = v);
112112

113113
public string SearchFilter
114114
{
@@ -119,8 +119,8 @@ public string SearchFilter
119119
public static readonly DirectProperty<BranchSelector, bool> UsePureNameProperty =
120120
AvaloniaProperty.RegisterDirect<BranchSelector, bool>(
121121
nameof(UsePureName),
122-
o => o.UsePureName,
123-
(o, v) => o.UsePureName = v);
122+
static o => o.UsePureName,
123+
static (o, v) => o.UsePureName = v);
124124

125125
public bool UsePureName
126126
{

‎src/Views/BranchTree.axaml.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ public partial class BranchTree : UserControl
273273
public static readonly DirectProperty<BranchTree, List<ViewModels.BranchTreeNode>> NodesProperty =
274274
AvaloniaProperty.RegisterDirect<BranchTree, List<ViewModels.BranchTreeNode>>(
275275
nameof(Nodes),
276-
o => o.Nodes,
277-
(o, v) => o.Nodes = v);
276+
static o => o.Nodes,
277+
static (o, v) => o.Nodes = v);
278278

279279
public List<ViewModels.BranchTreeNode> Nodes
280280
{

‎src/Views/ChangeCollectionView.axaml.cs‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ public partial class ChangeCollectionView : UserControl
9393
public static readonly DirectProperty<ChangeCollectionView, bool> IsUnstagedChangeProperty =
9494
AvaloniaProperty.RegisterDirect<ChangeCollectionView, bool>(
9595
nameof(IsUnstagedChange),
96-
o => o.IsUnstagedChange,
97-
(o, v) => o.IsUnstagedChange = v);
96+
static o => o.IsUnstagedChange,
97+
static (o, v) => o.IsUnstagedChange = v);
9898

9999
public bool IsUnstagedChange
100100
{
@@ -105,8 +105,8 @@ public bool IsUnstagedChange
105105
public static readonly DirectProperty<ChangeCollectionView, Models.ChangeViewMode> ViewModeProperty =
106106
AvaloniaProperty.RegisterDirect<ChangeCollectionView, Models.ChangeViewMode>(
107107
nameof(ViewMode),
108-
o => o.ViewMode,
109-
(o, v) => o.ViewMode = v);
108+
static o => o.ViewMode,
109+
static (o, v) => o.ViewMode = v);
110110

111111
public Models.ChangeViewMode ViewMode
112112
{
@@ -117,8 +117,8 @@ public Models.ChangeViewMode ViewMode
117117
public static readonly DirectProperty<ChangeCollectionView, bool> EnableCompactFoldersProperty =
118118
AvaloniaProperty.RegisterDirect<ChangeCollectionView, bool>(
119119
nameof(EnableCompactFolders),
120-
o => o.EnableCompactFolders,
121-
(o, v) => o.EnableCompactFolders = v);
120+
static o => o.EnableCompactFolders,
121+
static (o, v) => o.EnableCompactFolders = v);
122122

123123
public bool EnableCompactFolders
124124
{
@@ -129,8 +129,8 @@ public bool EnableCompactFolders
129129
public static readonly DirectProperty<ChangeCollectionView, List<Models.Change>> ChangesProperty =
130130
AvaloniaProperty.RegisterDirect<ChangeCollectionView, List<Models.Change>>(
131131
nameof(Changes),
132-
o => o.Changes,
133-
(o, v) => o.Changes = v);
132+
static o => o.Changes,
133+
static (o, v) => o.Changes = v);
134134

135135
public List<Models.Change> Changes
136136
{
@@ -141,8 +141,8 @@ public List<Models.Change> Changes
141141
public static readonly DirectProperty<ChangeCollectionView, List<Models.Change>> SelectedChangesProperty =
142142
AvaloniaProperty.RegisterDirect<ChangeCollectionView, List<Models.Change>>(
143143
nameof(SelectedChanges),
144-
o => o.SelectedChanges,
145-
(o, v) => o.SelectedChanges = v);
144+
static o => o.SelectedChanges,
145+
static (o, v) => o.SelectedChanges = v);
146146

147147
public List<Models.Change> SelectedChanges
148148
{

‎src/Views/ChangeStatusIcon.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public class ChangeStatusIcon : Control
2727
public static readonly DirectProperty<ChangeStatusIcon, bool> IsUnstagedChangeProperty =
2828
AvaloniaProperty.RegisterDirect<ChangeStatusIcon, bool>(
2929
nameof(IsUnstagedChange),
30-
o => o.IsUnstagedChange,
31-
(o, v) => o.IsUnstagedChange = v);
30+
static o => o.IsUnstagedChange,
31+
static (o, v) => o.IsUnstagedChange = v);
3232

3333
public bool IsUnstagedChange
3434
{
@@ -39,8 +39,8 @@ public bool IsUnstagedChange
3939
public static readonly DirectProperty<ChangeStatusIcon, Models.Change> ChangeProperty =
4040
AvaloniaProperty.RegisterDirect<ChangeStatusIcon, Models.Change>(
4141
nameof(Change),
42-
o => o.Change,
43-
(o, v) => o.Change = v);
42+
static o => o.Change,
43+
static (o, v) => o.Change = v);
4444

4545
public Models.Change Change
4646
{

0 commit comments

Comments
 (0)