The OpenGSQ .NET library provides a convenient way to query servers from applications written in the C# language.
Detailed documentation is available at https://dotnet.opengsq.com.
A list of supported protocols can be found at https://dotnet.opengsq.com/api/OpenGSQ.Protocols.html.
The library requires a minimum of .NET Standard 2.0.
You can find a list of all supported frameworks at Supported Frameworks.
You can find the package through the NuGet Package Manager or install it using the following command:
dotnet add package OpenGSQ
Here is an example of how to use the Source Query Protocol with OpenGSQ
using System;
using System.Threading.Tasks;
using OpenGSQ.Protocols;
class Program
{
static async Task Main()
{
// Create a new Source object
var source = new Source("45.62.160.71", 27015);
// Call the GetInfo method
var info = await source.GetInfo();
// Now you can use the 'info' object
}
}
You can find information about tests and results at https://dotnet.opengsq.com/tests.