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

Commit f15a295

Browse files
committed
Cleanup GitRemote class
1 parent 1528234 commit f15a295

File tree

1 file changed

+15
-42
lines changed

1 file changed

+15
-42
lines changed

src/GitHub.Api/Git/GitRemote.cs

Lines changed: 15 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -24,41 +24,6 @@ public struct GitRemote
2424
public GitRemoteFunction function;
2525
public string token;
2626

27-
public string Name
28-
{
29-
get { return name; }
30-
}
31-
32-
public string Url
33-
{
34-
get { return url; }
35-
}
36-
37-
public string Login
38-
{
39-
get { return login; }
40-
}
41-
42-
public string User
43-
{
44-
get { return user; }
45-
}
46-
47-
public string Token
48-
{
49-
get { return token; }
50-
}
51-
52-
public string Host
53-
{
54-
get { return host; }
55-
}
56-
57-
public GitRemoteFunction Function
58-
{
59-
get { return function; }
60-
}
61-
6227
public GitRemote(string name, string host, string url, GitRemoteFunction function, string user, string login, string token)
6328
{
6429
this.name = name;
@@ -77,8 +42,8 @@ public GitRemote(string name, string host, string url, GitRemoteFunction functio
7742
this.host = host;
7843
this.function = function;
7944
this.user = user;
80-
login = null;
81-
token = null;
45+
this.login = null;
46+
this.token = null;
8247
}
8348

8449
public GitRemote(string name, string host, string url, GitRemoteFunction function)
@@ -96,11 +61,11 @@ public GitRemote(string name, string url)
9661
{
9762
this.name = name;
9863
this.url = url;
99-
login = null;
100-
user = null;
101-
token = null;
102-
host = null;
103-
function = GitRemoteFunction.Unknown;
64+
this.login = null;
65+
this.user = null;
66+
this.token = null;
67+
this.host = null;
68+
this.function = GitRemoteFunction.Unknown;
10469
}
10570

10671
public override string ToString()
@@ -114,5 +79,13 @@ public override string ToString()
11479
sb.AppendLine(String.Format("Function: {0}", Function));
11580
return sb.ToString();
11681
}
82+
83+
public string Name => name;
84+
public string Url => url;
85+
public string Login => login;
86+
public string User => user;
87+
public string Token => token;
88+
public string Host => host;
89+
public GitRemoteFunction Function => function;
11790
}
11891
}

0 commit comments

Comments
 (0)