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

Commit 18779df

Browse files
Following struct with Default pattern in GitRemote
1 parent 2a6e2dd commit 18779df

File tree

1 file changed

+51
-7
lines changed

1 file changed

+51
-7
lines changed

src/GitHub.Api/Git/GitRemote.cs

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,57 @@ public enum GitRemoteFunction
1414
[Serializable]
1515
public struct GitRemote
1616
{
17-
public string Name;
18-
public string Url;
19-
public string Login;
20-
public string User;
21-
public string Token;
22-
public string Host;
23-
public GitRemoteFunction Function;
17+
public static GitRemote Default = new GitRemote();
18+
19+
private string name;
20+
private string url;
21+
private string login;
22+
private string user;
23+
private string host;
24+
private GitRemoteFunction function;
25+
26+
public string Name
27+
{
28+
get { return name; }
29+
}
30+
31+
public string Url
32+
{
33+
get { return url; }
34+
}
35+
36+
public string Login
37+
{
38+
get { return login; }
39+
}
40+
41+
public string User
42+
{
43+
get { return user; }
44+
}
45+
46+
public string Token { get; }
47+
48+
public string Host
49+
{
50+
get { return host; }
51+
}
52+
53+
public GitRemoteFunction Function
54+
{
55+
get { return function; }
56+
}
57+
58+
public GitRemote(string name, string url, string login, string user, string token, string host, GitRemoteFunction function)
59+
{
60+
this.name = name;
61+
this.url = url;
62+
this.login = login;
63+
this.user = user;
64+
Token = token;
65+
this.host = host;
66+
this.function = function;
67+
}
2468

2569
public override string ToString()
2670
{

0 commit comments

Comments
 (0)