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

Commit 07ae865

Browse files
committed
Merge fixes/oh-my-struct-constructor into features/using-cache-manager
2 parents cc41b22 + b292c85 commit 07ae865

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

src/GitHub.Api/Git/GitBranch.cs

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,33 @@
22

33
namespace GitHub.Unity
44
{
5+
interface ITreeData
6+
{
7+
string Name { get; }
8+
bool IsActive { get; }
9+
}
10+
511
[Serializable]
6-
public struct GitBranch
12+
public struct GitBranch : ITreeData
713
{
8-
public string Name;
9-
public string Tracking;
10-
public bool IsActive;
14+
public static GitBranch Default = new GitBranch();
15+
16+
public string name;
17+
public string tracking;
18+
public bool isActive;
19+
20+
public string Name { get { return name; } }
21+
public string Tracking { get { return tracking; } }
22+
public bool IsActive { get { return isActive; } }
23+
24+
public GitBranch(string name, string tracking, bool active)
25+
{
26+
Guard.ArgumentNotNullOrWhiteSpace(name, "name");
27+
28+
this.name = name;
29+
this.tracking = tracking;
30+
this.isActive = active;
31+
}
1132

1233
public override string ToString()
1334
{

0 commit comments

Comments
 (0)