Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit bf72ab6

Browse files
committed
Properties should be at the end of classes
1 parent 23c92e2 commit bf72ab6

File tree

8 files changed

+73
-72
lines changed

8 files changed

+73
-72
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/AuthenticationView.cs

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,6 @@ class AuthenticationView : Subview
3030
[NonSerialized] private bool enterPressed;
3131
[NonSerialized] private string password = "";
3232

33-
[NonSerialized] private AuthenticationService authenticationService;
34-
private AuthenticationService AuthenticationService
35-
{
36-
get
37-
{
38-
if (authenticationService == null)
39-
{
40-
UriString host;
41-
if (Repository != null && Repository.CloneUrl != null && Repository.CloneUrl.IsValidUri)
42-
{
43-
host = new UriString(Repository.CloneUrl.ToRepositoryUri()
44-
.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
45-
}
46-
else
47-
{
48-
host = UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri);
49-
}
50-
51-
AuthenticationService = new AuthenticationService(host, Platform.Keychain);
52-
}
53-
return authenticationService;
54-
}
55-
set
56-
{
57-
authenticationService = value;
58-
}
59-
}
6033

6134
public override void InitializeView(IView parent)
6235
{
@@ -124,11 +97,6 @@ public override void OnGUI()
12497
GUILayout.EndScrollView();
12598
}
12699

127-
public override bool IsBusy
128-
{
129-
get { return isBusy; }
130-
}
131-
132100
private void HandleEnterPressed()
133101
{
134102
if (Event.current.type != EventType.KeyDown)
@@ -255,5 +223,37 @@ private void ShowErrorMessage()
255223
GUILayout.Label(errorMessage, Styles.ErrorLabel);
256224
}
257225
}
226+
227+
private AuthenticationService AuthenticationService
228+
{
229+
get
230+
{
231+
if (authenticationService == null)
232+
{
233+
UriString host;
234+
if (Repository != null && Repository.CloneUrl != null && Repository.CloneUrl.IsValidUri)
235+
{
236+
host = new UriString(Repository.CloneUrl.ToRepositoryUri()
237+
.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
238+
}
239+
else
240+
{
241+
host = UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri);
242+
}
243+
244+
AuthenticationService = new AuthenticationService(host, Platform.Keychain);
245+
}
246+
return authenticationService;
247+
}
248+
set
249+
{
250+
authenticationService = value;
251+
}
252+
}
253+
254+
public override bool IsBusy
255+
{
256+
get { return isBusy; }
257+
}
258258
}
259259
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/BranchesView.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,6 @@ public override void OnGUI()
128128
OnEmbeddedGUI();
129129
}
130130

131-
public override bool IsBusy
132-
{
133-
get { return false; }
134-
}
135-
136131
public void OnEmbeddedGUI()
137132
{
138133
scroll = GUILayout.BeginScrollView(scroll);
@@ -749,6 +744,11 @@ private void OnTreeNodeChildrenGUI(BranchTreeNode node)
749744
}
750745
}
751746

747+
public override bool IsBusy
748+
{
749+
get { return false; }
750+
}
751+
752752
private enum NodeType
753753
{
754754
Folder,

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ public override void OnDisable()
5252
Repository.OnStatusUpdated -= RunStatusUpdateOnMainThread;
5353
}
5454

55-
public override bool IsBusy
56-
{
57-
get { return isBusy; }
58-
}
59-
6055
private void RunStatusUpdateOnMainThread(GitStatus status)
6156
{
6257
new ActionTask(TaskManager.Token, _ => OnStatusUpdate(status))
@@ -217,5 +212,10 @@ private void Commit()
217212
isBusy = false;
218213
}).Start();
219214
}
215+
216+
public override bool IsBusy
217+
{
218+
get { return isBusy; }
219+
}
220220
}
221221
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesetTreeView.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,6 @@ public override void OnGUI()
8686
GUILayout.EndVertical();
8787
}
8888

89-
public override bool IsBusy
90-
{
91-
get { return false; }
92-
}
93-
94-
private void OnCommitTreeChange()
95-
{
96-
Height = 0f;
97-
Redraw();
98-
}
99-
10089
public void UpdateEntries(IList<GitStatusEntry> newEntries)
10190
{
10291
// Handle the empty list scenario
@@ -117,6 +106,12 @@ public void UpdateEntries(IList<GitStatusEntry> newEntries)
117106
OnCommitTreeChange();
118107
}
119108

109+
private void OnCommitTreeChange()
110+
{
111+
Height = 0f;
112+
Redraw();
113+
}
114+
120115
private void TreeNode(FileTreeNode node)
121116
{
122117
GUILayout.Space(Styles.TreeVerticalSpacing);
@@ -280,6 +275,11 @@ private void TreeNode(FileTreeNode node)
280275
GUILayout.EndHorizontal();
281276
}
282277

278+
public override bool IsBusy
279+
{
280+
get { return false; }
281+
}
282+
283283
public float Height { get; protected set; }
284284

285285
public bool Readonly { get; set; }

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/HistoryView.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,6 @@ public override void OnGUI()
125125
OnEmbeddedGUI();
126126
}
127127

128-
public override bool IsBusy
129-
{
130-
get { return isBusy; }
131-
}
132128
private void AttachHandlers(IRepository repository)
133129
{
134130
if (repository == null)
@@ -750,6 +746,11 @@ private void DrawTimelineRectAroundIconRect(Rect parentRect, Rect iconRect)
750746
EditorGUI.DrawRect(bottomTimelineRect, timelineBarColor);
751747
}
752748

749+
public override bool IsBusy
750+
{
751+
get { return isBusy; }
752+
}
753+
753754
private float EntryHeight
754755
{
755756
get { return Styles.HistoryEntryHeight + Styles.HistoryEntryPadding; }

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/PopupWindow.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ public override void OnSelectionChange()
9393
ActiveView.OnSelectionChange();
9494
}
9595

96-
public override bool IsBusy
97-
{
98-
get { return ActiveView.IsBusy; }
99-
}
100-
10196
public override void Finish(bool result)
10297
{
10398
OnClose.SafeInvoke(result);
@@ -113,6 +108,11 @@ public override void OnDestroy()
113108
OnClose = null;
114109
}
115110

111+
public override bool IsBusy
112+
{
113+
get { return ActiveView.IsBusy; }
114+
}
115+
116116
private Subview ActiveView
117117
{
118118
get

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/SettingsView.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ public override void OnRepositoryChanged(IRepository oldRepository)
8585
Refresh();
8686
}
8787

88-
public override bool IsBusy
89-
{
90-
get { return isBusy; }
91-
}
92-
9388
public override void Refresh()
9489
{
9590
base.Refresh();
@@ -522,5 +517,10 @@ private void OnLoggingSettingsGui()
522517
}
523518
EditorGUI.EndDisabledGroup();
524519
}
520+
521+
public override bool IsBusy
522+
{
523+
get { return isBusy; }
524+
}
525525
}
526526
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ public override void OnSelectionChange()
139139
ActiveView.OnSelectionChange();
140140
}
141141

142-
public override bool IsBusy
143-
{
144-
get { return false; }
145-
}
146-
147142
public override void Refresh()
148143
{
149144
base.Refresh();
@@ -401,6 +396,11 @@ public SettingsView SettingsView
401396
get { return settingsView; }
402397
}
403398

399+
public override bool IsBusy
400+
{
401+
get { return false; }
402+
}
403+
404404
private Subview ActiveView
405405
{
406406
get

0 commit comments

Comments
 (0)