Skip to content

Commit 4260799

Browse files
committed
Modified licence header slightly; tidy usings.
1 parent 957718b commit 4260799

11 files changed

Lines changed: 109 additions & 44 deletions

csharp-github-api/Api.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//-----------------------------------------------------------------------
22
// <copyright file="Api.cs" company="TemporalCohesion.co.uk">
3-
// Copyright [2010] [Stuart Grassie]
3+
// Copyright 2010 - Present Stuart Grassie
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");
66
// you may not use this file except in compliance with the License.
@@ -16,15 +16,15 @@
1616
// </copyright>
1717
//----------------------------------------------------------------------
1818

19-
using System;
20-
using System.Collections.Generic;
21-
using System.Diagnostics;
22-
using System.Linq;
23-
using RestSharp;
24-
using csharp_github_api.Exceptions;
25-
2619
namespace csharp_github_api
2720
{
21+
using Exceptions;
22+
using RestSharp;
23+
using System;
24+
using System.Collections.Generic;
25+
using System.Diagnostics;
26+
using System.Linq;
27+
2828
/// <summary>
2929
/// Base class for specific API classes.
3030
/// </summary>

csharp-github-api/Core/Header.cs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
1+
//-----------------------------------------------------------------------
2+
// <copyright file="Header.cs" company="TemporalCohesion.co.uk">
3+
// Copyright 2012 - Present Stuart Grassie
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// </copyright>
17+
//----------------------------------------------------------------------
518

619
namespace csharp_github_api.Core
720
{
21+
using System;
22+
823
public interface IHeader
924
{
1025
string Name { get; set; }

csharp-github-api/Core/HeaderProvider.cs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using RestSharp;
1+
//-----------------------------------------------------------------------
2+
// <copyright file="HeaderProvider.cs" company="TemporalCohesion.co.uk">
3+
// Copyright 2012 - Present Stuart Grassie
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// </copyright>
17+
//----------------------------------------------------------------------
418

519
namespace csharp_github_api.Core
620
{
21+
using System;
22+
using System.Collections.Generic;
23+
using RestSharp;
24+
725
public interface IHeaderProvider
826
{
927
HashSet<IHeader> Headers { get; set; }

csharp-github-api/Exceptions/GitHubAuthorizationException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//-----------------------------------------------------------------------
22
// <copyright file="GitHubAuthorizationException.cs" company="TemporalCohesion.co.uk">
3-
// Copyright [2010] [Stuart Grassie]
3+
// Copyright 2010 - Present Stuart Grassie
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");
66
// you may not use this file except in compliance with the License.
@@ -16,10 +16,10 @@
1616
// </copyright>
1717
//----------------------------------------------------------------------
1818

19-
using System;
20-
2119
namespace csharp_github_api.Exceptions
2220
{
21+
using System;
22+
2323
[Serializable]
2424
public class GitHubAuthorizationException : Exception
2525
{

csharp-github-api/Exceptions/GitHubResponseException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//-----------------------------------------------------------------------
22
// <copyright file="GitHubResponseException.cs" company="TemporalCohesion.co.uk">
3-
// Copyright [2010] [Stuart Grassie]
3+
// Copyright 2010 - Present Stuart Grassie
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");
66
// you may not use this file except in compliance with the License.
@@ -16,10 +16,10 @@
1616
// </copyright>
1717
//----------------------------------------------------------------------
1818

19-
using System;
20-
2119
namespace csharp_github_api.Exceptions
2220
{
21+
using System;
22+
2323
[Serializable]
2424
public class GitHubResponseException : Exception
2525
{

csharp-github-api/Extensions/MiscExtensions.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//-----------------------------------------------------------------------
2-
// <copyright file="MiscExtensionscs" company="TemporalCohesion.co.uk">
3-
// Copyright [2011] [Stuart Grassie]
2+
// <copyright file="MiscExtensions.cs" company="TemporalCohesion.co.uk">
3+
// Copyright 2011 - Present Stuart Grassie
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");
66
// you may not use this file except in compliance with the License.
@@ -16,12 +16,11 @@
1616
// </copyright>
1717
//----------------------------------------------------------------------
1818

19-
using System.Collections.Generic;
20-
using RestSharp;
21-
using csharp_github_api.Exceptions;
22-
2319
namespace csharp_github_api.Extensions
2420
{
21+
using Exceptions;
22+
using RestSharp;
23+
using System.Collections.Generic;
2524
using System.Net;
2625

2726
/// <summary>

csharp-github-api/Github.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//-----------------------------------------------------------------------
22
// <copyright file="Github.cs" company="TemporalCohesion.co.uk">
3-
// Copyright [2010] [Stuart Grassie]
3+
// Copyright 2010 - Present Stuart Grassie
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");
66
// you may not use this file except in compliance with the License.
@@ -27,9 +27,8 @@ namespace csharp_github_api
2727
/// </summary>
2828
public partial class GithubRestApiClient : Api
2929
{
30-
private IAuthenticator _gitHubAuthenticator;
3130
private static IRestRequestFactory _restRequestFactory;
32-
private IRestClient _innerRestClient;
31+
private readonly IRestClient _innerRestClient;
3332

3433
/// <summary>
3534
/// Default Constructor.

csharp-github-api/Resource/IRestRequestFactory.cs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using RestSharp;
1+
//-----------------------------------------------------------------------
2+
// <copyright file="IRestRequestFactory.cs" company="TemporalCohesion.co.uk">
3+
// Copyright 2012 - Present Stuart Grassie
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// </copyright>
17+
//----------------------------------------------------------------------
418

519
namespace csharp_github_api.Resource
620
{
21+
using RestSharp;
22+
using System;
23+
using System.Collections.Generic;
24+
725
public interface IRestRequestFactory
826
{
927
IRestRequest CreateRequest(Func<IRestRequest> request);

csharp-github-api/Resource/RestRequestFactory.cs

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using RestSharp;
4-
using csharp_github_api.Core;
1+
//-----------------------------------------------------------------------
2+
// <copyright file="RestRequestFactory.cs" company="TemporalCohesion.co.uk">
3+
// Copyright 2012 - Present Stuart Grassie
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
// </copyright>
17+
//----------------------------------------------------------------------
518

619
namespace csharp_github_api.Resource
720
{
21+
using Core;
22+
using RestSharp;
23+
using System;
24+
using System.Collections.Generic;
25+
826
public class RestRequestFactory : IRestRequestFactory
927
{
1028
private static IHeaderProvider _headerProvider;

csharp-github-api/RestSharpRestResponseExtension.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//-----------------------------------------------------------------------
22
// <copyright file="RestSharpRestResponseExtension.cs" company="TemporalCohesion.co.uk">
3-
// Copyright [2012] [Stuart Grassie]
3+
// Copyright 2012 - Present Stuart Grassie
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");
66
// you may not use this file except in compliance with the License.
@@ -16,10 +16,9 @@
1616
// </copyright>
1717
//----------------------------------------------------------------------
1818

19-
using csharp_github_api.Lib;
20-
2119
namespace csharp_github_api
2220
{
21+
using Lib;
2322
using RestSharp;
2423

2524
public static class RestSharpRestResponseExtension

0 commit comments

Comments
 (0)