mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-26 05:28:07 +03:00
ServerList namespace
This commit is contained in:
parent
603bd95c38
commit
59c0550cfc
@ -33,7 +33,7 @@ namespace Steamworks
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task ServerListInternetInterupted()
|
public async Task ServerListInternetInterupted()
|
||||||
{
|
{
|
||||||
using ( var list = new ServerListInternet() )
|
using ( var list = new ServerList.Internet() )
|
||||||
{
|
{
|
||||||
var task = list.RunQueryAsync();
|
var task = list.RunQueryAsync();
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ namespace Steamworks
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task ServerListInternet()
|
public async Task ServerListInternet()
|
||||||
{
|
{
|
||||||
using ( var list = new ServerListInternet() )
|
using ( var list = new ServerList.Internet() )
|
||||||
{
|
{
|
||||||
var success = await list.RunQueryAsync();
|
var success = await list.RunQueryAsync();
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ namespace Steamworks
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task ServerListLan()
|
public async Task ServerListLan()
|
||||||
{
|
{
|
||||||
using ( var list = new ServerListLan() )
|
using ( var list = new ServerList.LocalNetwork() )
|
||||||
{
|
{
|
||||||
var success = await list.RunQueryAsync();
|
var success = await list.RunQueryAsync();
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ namespace Steamworks
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task ServerListFavourites()
|
public async Task ServerListFavourites()
|
||||||
{
|
{
|
||||||
using ( var list = new ServerListFavourites() )
|
using ( var list = new ServerList.Favourites() )
|
||||||
{
|
{
|
||||||
var success = await list.RunQueryAsync();
|
var success = await list.RunQueryAsync();
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ namespace Steamworks
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task ServerListFriends()
|
public async Task ServerListFriends()
|
||||||
{
|
{
|
||||||
using ( var list = new ServerListFriends() )
|
using ( var list = new ServerList.Friends() )
|
||||||
{
|
{
|
||||||
var success = await list.RunQueryAsync();
|
var success = await list.RunQueryAsync();
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ namespace Steamworks
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task ServerListHistory()
|
public async Task ServerListHistory()
|
||||||
{
|
{
|
||||||
using ( var list = new ServerListHistory() )
|
using ( var list = new ServerList.History() )
|
||||||
{
|
{
|
||||||
var success = await list.RunQueryAsync();
|
var success = await list.RunQueryAsync();
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ namespace Steamworks
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task FilterByMap()
|
public async Task FilterByMap()
|
||||||
{
|
{
|
||||||
using ( var list = new ServerListInternet() )
|
using ( var list = new ServerList.Internet() )
|
||||||
{
|
{
|
||||||
list.AddFilter( "map", "de_dust" );
|
list.AddFilter( "map", "de_dust" );
|
||||||
|
|
||||||
|
@ -5,12 +5,9 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Steamworks.Data;
|
using Steamworks.Data;
|
||||||
|
|
||||||
namespace Steamworks
|
namespace Steamworks.ServerList
|
||||||
{
|
{
|
||||||
/// <summary>
|
public abstract class Base : IDisposable
|
||||||
/// Not for reuse by newbs
|
|
||||||
/// </summary>
|
|
||||||
public abstract class BaseServerList : IDisposable
|
|
||||||
{
|
{
|
||||||
|
|
||||||
#region ISteamMatchmakingServers
|
#region ISteamMatchmakingServers
|
||||||
@ -57,7 +54,7 @@ namespace Steamworks
|
|||||||
public List<ServerInfo> Unresponsive = new List<ServerInfo>();
|
public List<ServerInfo> Unresponsive = new List<ServerInfo>();
|
||||||
|
|
||||||
|
|
||||||
public BaseServerList()
|
public Base()
|
||||||
{
|
{
|
||||||
AppId = SteamUtils.AppId; // Default AppId is this
|
AppId = SteamUtils.AppId; // Default AppId is this
|
||||||
}
|
}
|
@ -4,12 +4,9 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Steamworks
|
namespace Steamworks.ServerList
|
||||||
{
|
{
|
||||||
/// <summary>
|
public class Favourites : Base
|
||||||
/// Not for reuse by newbs
|
|
||||||
/// </summary>
|
|
||||||
public class ServerListFavourites : BaseServerList
|
|
||||||
{
|
{
|
||||||
internal override void LaunchQuery()
|
internal override void LaunchQuery()
|
||||||
{
|
{
|
@ -4,12 +4,9 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Steamworks
|
namespace Steamworks.ServerList
|
||||||
{
|
{
|
||||||
/// <summary>
|
public class Friends : Base
|
||||||
/// Not for reuse by newbs
|
|
||||||
/// </summary>
|
|
||||||
public class ServerListFriends : BaseServerList
|
|
||||||
{
|
{
|
||||||
internal override void LaunchQuery()
|
internal override void LaunchQuery()
|
||||||
{
|
{
|
@ -4,12 +4,9 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Steamworks
|
namespace Steamworks.ServerList
|
||||||
{
|
{
|
||||||
/// <summary>
|
public class History : Base
|
||||||
/// Not for reuse by newbs
|
|
||||||
/// </summary>
|
|
||||||
public class ServerListHistory : BaseServerList
|
|
||||||
{
|
{
|
||||||
internal override void LaunchQuery()
|
internal override void LaunchQuery()
|
||||||
{
|
{
|
@ -4,12 +4,9 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Steamworks
|
namespace Steamworks.ServerList
|
||||||
{
|
{
|
||||||
/// <summary>
|
public class Internet : Base
|
||||||
/// Not for reuse by newbs
|
|
||||||
/// </summary>
|
|
||||||
public class ServerListInternet : BaseServerList
|
|
||||||
{
|
{
|
||||||
internal override void LaunchQuery()
|
internal override void LaunchQuery()
|
||||||
{
|
{
|
@ -4,12 +4,9 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Steamworks
|
namespace Steamworks.ServerList
|
||||||
{
|
{
|
||||||
/// <summary>
|
public class LocalNetwork : Base
|
||||||
/// Not for reuse by newbs
|
|
||||||
/// </summary>
|
|
||||||
public class ServerListLan : BaseServerList
|
|
||||||
{
|
{
|
||||||
internal override void LaunchQuery()
|
internal override void LaunchQuery()
|
||||||
{
|
{
|
@ -1,19 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Steamworks
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
public class ServerListSpectator : BaseServerList
|
|
||||||
{
|
|
||||||
internal override void LaunchQuery()
|
|
||||||
{
|
|
||||||
var filters = GetFilters();
|
|
||||||
request = Internal.RequestSpectatorServerList( AppId.Value, filters, (uint)filters.Length, IntPtr.Zero );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user