Skip to content

Commit 429e538

Browse files
committed
Change return type of connect to be ServerQuery in order to be able to use its functions in a chain function call
1 parent e46002a commit 429e538

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

SteamQueryNet/SteamQueryNet/ServerQuery.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public interface IServerQuery
2525
/// </summary>
2626
/// <param name="serverAddress">IPAddress or HostName of the server that queries will be sent.</param>
2727
/// <param name="port">Port of the server that queries will be sent.</param>
28-
void Connect(string serverAddress, int port);
28+
/// <returns>Connected instance of ServerQuery.</returns>
29+
IServerQuery Connect(string serverAddress, int port);
2930

3031
/// <summary>
3132
/// Requests and serializes the server information.
@@ -96,9 +97,10 @@ public ServerQuery(string serverAddress, int port)
9697
}
9798

9899
/// <inheritdoc/>
99-
public void Connect(string serverAddress, int port)
100+
public IServerQuery Connect(string serverAddress, int port)
100101
{
101102
PrepareAndConnect(serverAddress, port);
103+
return this;
102104
}
103105

104106
/// <inheritdoc/>

SteamQueryNet/SteamQueryNet/SteamQueryNet.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<Authors>Cem YILMAZ</Authors>
66
<Company>Cem YILMAZ</Company>
7+
<Version>1.0.2</Version>
8+
<AssemblyVersion>1.0.0.2</AssemblyVersion>
9+
<NeutralLanguage>en</NeutralLanguage>
10+
<PackageTags>steam,query,net,steamquery,steamquerynet</PackageTags>
11+
<FileVersion>1.0.0.2</FileVersion>
712
</PropertyGroup>
813

914
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

0 commit comments

Comments
 (0)