File tree Expand file tree Collapse file tree 4 files changed +34
-3
lines changed Expand file tree Collapse file tree 4 files changed +34
-3
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,9 @@ public IList<Repository> getOrganizationRepositories(string organization)
99
99
request . AddUrlSegment ( "org" , organization ) ;
100
100
101
101
var list = client . Get < List < Repository > > ( request ) . Data ;
102
- list . ForEach ( r => r . _client = client ) ;
102
+
103
+ Organization org = new Organization { Login = organization } ;
104
+ list . ForEach ( r => { r . _client = client ; r . Organization = org ; } ) ;
103
105
return list ;
104
106
}
105
107
}
Original file line number Diff line number Diff line change 8
8
<ProjectGuid >{F50B1DBF-1C9F-4437-87EC-7ABA805CC446}</ProjectGuid >
9
9
<OutputType >Library</OutputType >
10
10
<AppDesignerFolder >Properties</AppDesignerFolder >
11
- <RootNamespace >hub</RootNamespace >
12
- <AssemblyName >hub</AssemblyName >
11
+ <RootNamespace >Git. hub</RootNamespace >
12
+ <AssemblyName >Git. hub</AssemblyName >
13
13
<TargetFrameworkVersion >v3.5</TargetFrameworkVersion >
14
14
<FileAlignment >512</FileAlignment >
15
15
<TargetFrameworkProfile />
40
40
<ItemGroup >
41
41
<Compile Include =" Branch.cs" />
42
42
<Compile Include =" Client.cs" />
43
+ <Compile Include =" Organization.cs" />
43
44
<Compile Include =" Properties\AssemblyInfo.cs" />
44
45
<Compile Include =" PullRequest.cs" />
45
46
<Compile Include =" Repository.cs" />
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Linq ;
4
+ using System . Text ;
5
+
6
+ namespace Git . hub
7
+ {
8
+ public class Organization
9
+ {
10
+ public string Login { get ; internal set ; }
11
+
12
+ public override bool Equals ( object obj )
13
+ {
14
+ return GetHashCode ( ) == obj . GetHashCode ( ) ;
15
+ }
16
+
17
+ public override int GetHashCode ( )
18
+ {
19
+ return GetType ( ) . GetHashCode ( ) + Login . GetHashCode ( ) ;
20
+ }
21
+
22
+ public override string ToString ( )
23
+ {
24
+ return Login ;
25
+ }
26
+ }
27
+ }
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ public class Repository
15
15
public bool Fork { get ; private set ; }
16
16
public int Forks { get ; private set ; }
17
17
public bool Private { get ; private set ; }
18
+ public Organization Organization { get ; internal set ; }
18
19
19
20
private Repository _Parent ;
20
21
public Repository Parent
You can’t perform that action at this time.
0 commit comments