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

Commit d0f33d1

Browse files
authored
Merge pull request #389 from github-for-unity/fixes/oh-my-struct-constructor
Changing the struct GitBranch to use a default constructor and fields
2 parents 812bbff + b292c85 commit d0f33d1

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/GitHub.Api/Git/GitBranch.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,23 @@ interface ITreeData
1111
[Serializable]
1212
public struct GitBranch : ITreeData
1313
{
14-
private string name;
15-
private string tracking;
16-
private bool active;
14+
public static GitBranch Default = new GitBranch();
15+
16+
public string name;
17+
public string tracking;
18+
public bool isActive;
19+
1720
public string Name { get { return name; } }
1821
public string Tracking { get { return tracking; } }
19-
public bool IsActive { get { return active; } }
22+
public bool IsActive { get { return isActive; } }
2023

2124
public GitBranch(string name, string tracking, bool active)
2225
{
2326
Guard.ArgumentNotNullOrWhiteSpace(name, "name");
2427

2528
this.name = name;
2629
this.tracking = tracking;
27-
this.active = active;
30+
this.isActive = active;
2831
}
2932

3033
public override string ToString()

0 commit comments

Comments
 (0)