Skip to content

Commit 4e07ff1

Browse files
authored
Merge pull request #212 from sungam3r/code-cleanup
spell check, formatting, code cleanup
2 parents aadf594 + 51f313d commit 4e07ff1

File tree

73 files changed

+241
-376
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+241
-376
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
6-
<IsPackable>false</IsPackable>
7-
</PropertyGroup>
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>netcoreapp3.1</TargetFramework>
6+
<IsPackable>false</IsPackable>
7+
</PropertyGroup>
88

9-
<ItemGroup>
10-
<ProjectReference Include="..\..\src\GraphQL.Client.Serializer.Newtonsoft\GraphQL.Client.Serializer.Newtonsoft.csproj" />
11-
<ProjectReference Include="..\..\src\GraphQL.Client\GraphQL.Client.csproj" />
12-
</ItemGroup>
9+
<ItemGroup>
10+
<ProjectReference Include="..\..\src\GraphQL.Client.Serializer.Newtonsoft\GraphQL.Client.Serializer.Newtonsoft.csproj" />
11+
<ProjectReference Include="..\..\src\GraphQL.Client\GraphQL.Client.csproj" />
12+
</ItemGroup>
1313

1414
</Project>

examples/GraphQL.Client.Example/PersonAndFilmsResponse.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class PersonAndFilmsResponse
99
public class PersonContent
1010
{
1111
public string Name { get; set; }
12+
1213
public FilmConnectionContent FilmConnection { get; set; }
1314

1415
public class FilmConnectionContent

examples/GraphQL.Client.Example/Program.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77

88
namespace GraphQL.Client.Example
99
{
10-
1110
public class Program
1211
{
13-
14-
public static async Task Main(string[] args)
12+
public static async Task Main()
1513
{
16-
_ = args;
1714
using var graphQLClient = new GraphQLHttpClient("https://swapi.apis.guru/", new NewtonsoftJsonSerializer());
1815

1916
var personAndFilmsRequest = new GraphQLRequest
@@ -49,6 +46,5 @@ query PersonAndFilms($id: ID) {
4946
Console.WriteLine("Press any key to quit...");
5047
Console.ReadKey();
5148
}
52-
5349
}
5450
}

root.props

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<Project>
32

4-
<PropertyGroup>
5-
<Authors>Deinok,Alexander Rose,graphql-dotnet</Authors>
6-
<Description>A GraphQL Client for .NET Standard</Description>
7-
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
8-
<GenerateDocumentationFile>True</GenerateDocumentationFile>
9-
<LangVersion>8.0</LangVersion>
10-
<NeutralLanguage>en-US</NeutralLanguage>
11-
<NoWarn>CS0618;CS1591;CS1701;CS8618;CS8632;NU5048;NU5105;NU5125</NoWarn>
12-
<Nullable>annotations</Nullable>
13-
<PackageIcon>icon.png</PackageIcon>
14-
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
15-
<PackageProjectUrl>https://github.com/graphql-dotnet/graphql-client</PackageProjectUrl>
16-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
17-
<PackageTags>GraphQL</PackageTags>
18-
<RepositoryType>git</RepositoryType>
19-
<RepositoryUrl>https://github.com/graphql-dotnet/graphql-client</RepositoryUrl>
20-
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
21-
<WarningLevel>4</WarningLevel>
22-
</PropertyGroup>
3+
<PropertyGroup>
4+
<Authors>Deinok,Alexander Rose,graphql-dotnet</Authors>
5+
<Description>A GraphQL Client for .NET Standard</Description>
6+
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
7+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
8+
<LangVersion>8.0</LangVersion>
9+
<NeutralLanguage>en-US</NeutralLanguage>
10+
<NoWarn>$(NoWarn);CS1591;NU5048;NU5105;NU5125</NoWarn>
11+
<Nullable>annotations</Nullable>
12+
<PackageIcon>icon.png</PackageIcon>
13+
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
14+
<PackageProjectUrl>https://github.com/graphql-dotnet/graphql-client</PackageProjectUrl>
15+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
16+
<PackageTags>GraphQL</PackageTags>
17+
<RepositoryType>git</RepositoryType>
18+
<RepositoryUrl>https://github.com/graphql-dotnet/graphql-client</RepositoryUrl>
19+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
20+
<WarningLevel>4</WarningLevel>
21+
</PropertyGroup>
2322

24-
<ItemGroup>
25-
<Content Include="$(MSBuildThisFileDirectory)/LICENSE.txt">
26-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
27-
<Pack>true</Pack>
28-
<PackagePath>LICENSE.txt</PackagePath>
29-
<Visible>false</Visible>
30-
</Content>
31-
<Content Include="$(MSBuildThisFileDirectory)/assets/logo.64x64.png">
32-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
33-
<Pack>true</Pack>
34-
<PackagePath>icon.png</PackagePath>
35-
<Visible>false</Visible>
36-
</Content>
37-
</ItemGroup>
23+
<ItemGroup>
24+
<Content Include="$(MSBuildThisFileDirectory)/LICENSE.txt">
25+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
26+
<Pack>true</Pack>
27+
<PackagePath>LICENSE.txt</PackagePath>
28+
<Visible>false</Visible>
29+
</Content>
30+
<Content Include="$(MSBuildThisFileDirectory)/assets/logo.64x64.png">
31+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
32+
<Pack>true</Pack>
33+
<PackagePath>icon.png</PackagePath>
34+
<Visible>false</Visible>
35+
</Content>
36+
</ItemGroup>
3837

3938
</Project>
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="../src.props" />
2+
3+
<Import Project="../src.props" />
34

4-
<PropertyGroup>
5+
<PropertyGroup>
56
<Description>Abstractions for the Websocket transport used in GraphQL.Client</Description>
67
<TargetFramework>netstandard2.0</TargetFramework>
7-
</PropertyGroup>
8+
</PropertyGroup>
89

9-
<ItemGroup>
10-
<ProjectReference Include="..\GraphQL.Client.Abstractions\GraphQL.Client.Abstractions.csproj" />
11-
</ItemGroup>
10+
<ItemGroup>
11+
<ProjectReference Include="..\GraphQL.Client.Abstractions\GraphQL.Client.Abstractions.csproj" />
12+
</ItemGroup>
1213

1314
</Project>

src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketMessageType.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,5 @@ public static class GraphQLWebSocketMessageType
8484
/// id: string : operation id
8585
/// </summary>
8686
public const string GQL_STOP = "stop"; // Client -> Server
87-
8887
}
8988
}

src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketRequest.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace GraphQL.Client.Abstractions.Websocket
66
{
7-
87
/// <summary>
98
/// A Subscription Request
109
/// </summary>
@@ -50,7 +49,7 @@ public GraphQLRequest Payload
5049
public Task SendTask() => _tcs.Task;
5150

5251
/// <summary>
53-
/// gets called when the send operation for this request has completed sucessfully
52+
/// gets called when the send operation for this request has completed successfully
5453
/// </summary>
5554
public void SendCompleted() => _tcs.SetResult(true);
5655

@@ -109,7 +108,5 @@ public override int GetHashCode()
109108

110109
/// <inheritdoc />
111110
public static bool operator !=(GraphQLWebSocketRequest request1, GraphQLWebSocketRequest request2) => !(request1 == request2);
112-
113111
}
114-
115112
}

src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketResponse.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33

44
namespace GraphQL.Client.Abstractions.Websocket
55
{
6-
76
/// <summary>
87
/// A Subscription Response
98
/// </summary>
109
public class GraphQLWebSocketResponse : IEquatable<GraphQLWebSocketResponse>
1110
{
12-
1311
/// <summary>
1412
/// The Identifier of the Response
1513
/// </summary>
@@ -65,7 +63,6 @@ public override int GetHashCode()
6563
/// <inheritdoc />
6664
public static bool operator !=(GraphQLWebSocketResponse response1, GraphQLWebSocketResponse response2) =>
6765
!(response1 == response2);
68-
6966
}
7067

7168
public class GraphQLWebSocketResponse<TPayload> : GraphQLWebSocketResponse, IEquatable<GraphQLWebSocketResponse<TPayload>>

src/GraphQL.Client.Abstractions.Websocket/GraphQLWebsocketConnectionState.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ namespace GraphQL.Client.Abstractions.Websocket
33
public enum GraphQLWebsocketConnectionState
44
{
55
Disconnected,
6+
67
Connecting,
8+
79
Connected
810
}
911
}

src/GraphQL.Client.Abstractions.Websocket/IGraphQLWebsocketJsonSerializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public interface IGraphQLWebsocketJsonSerializer : IGraphQLJsonSerializer
1212
byte[] SerializeToBytes(GraphQLWebSocketRequest request);
1313

1414
Task<WebsocketMessageWrapper> DeserializeToWebsocketResponseWrapperAsync(Stream stream);
15-
GraphQLWebSocketResponse<GraphQLResponse<TResponse>> DeserializeToWebsocketResponse<TResponse>(byte[] bytes);
1615

16+
GraphQLWebSocketResponse<GraphQLResponse<TResponse>> DeserializeToWebsocketResponse<TResponse>(byte[] bytes);
1717
}
1818
}

0 commit comments

Comments
 (0)