ServerList namespace

This commit is contained in:
Garry Newman 2019-04-16 14:51:37 +01:00
parent 603bd95c38
commit 59c0550cfc
8 changed files with 20 additions and 57 deletions

View File

@ -33,7 +33,7 @@ namespace Steamworks
[TestMethod]
public async Task ServerListInternetInterupted()
{
using ( var list = new ServerListInternet() )
using ( var list = new ServerList.Internet() )
{
var task = list.RunQueryAsync();
@ -58,7 +58,7 @@ namespace Steamworks
[TestMethod]
public async Task ServerListInternet()
{
using ( var list = new ServerListInternet() )
using ( var list = new ServerList.Internet() )
{
var success = await list.RunQueryAsync();
@ -71,7 +71,7 @@ namespace Steamworks
[TestMethod]
public async Task ServerListLan()
{
using ( var list = new ServerListLan() )
using ( var list = new ServerList.LocalNetwork() )
{
var success = await list.RunQueryAsync();
@ -84,7 +84,7 @@ namespace Steamworks
[TestMethod]
public async Task ServerListFavourites()
{
using ( var list = new ServerListFavourites() )
using ( var list = new ServerList.Favourites() )
{
var success = await list.RunQueryAsync();
@ -97,7 +97,7 @@ namespace Steamworks
[TestMethod]
public async Task ServerListFriends()
{
using ( var list = new ServerListFriends() )
using ( var list = new ServerList.Friends() )
{
var success = await list.RunQueryAsync();
@ -110,7 +110,7 @@ namespace Steamworks
[TestMethod]
public async Task ServerListHistory()
{
using ( var list = new ServerListHistory() )
using ( var list = new ServerList.History() )
{
var success = await list.RunQueryAsync();
@ -123,7 +123,7 @@ namespace Steamworks
[TestMethod]
public async Task FilterByMap()
{
using ( var list = new ServerListInternet() )
using ( var list = new ServerList.Internet() )
{
list.AddFilter( "map", "de_dust" );

View File

@ -5,12 +5,9 @@ using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
namespace Steamworks.ServerList
{
/// <summary>
/// Not for reuse by newbs
/// </summary>
public abstract class BaseServerList : IDisposable
public abstract class Base : IDisposable
{
#region ISteamMatchmakingServers
@ -57,7 +54,7 @@ namespace Steamworks
public List<ServerInfo> Unresponsive = new List<ServerInfo>();
public BaseServerList()
public Base()
{
AppId = SteamUtils.AppId; // Default AppId is this
}

View File

@ -4,12 +4,9 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Steamworks
namespace Steamworks.ServerList
{
/// <summary>
/// Not for reuse by newbs
/// </summary>
public class ServerListFavourites : BaseServerList
public class Favourites : Base
{
internal override void LaunchQuery()
{

View File

@ -4,12 +4,9 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Steamworks
namespace Steamworks.ServerList
{
/// <summary>
/// Not for reuse by newbs
/// </summary>
public class ServerListFriends : BaseServerList
public class Friends : Base
{
internal override void LaunchQuery()
{

View File

@ -4,12 +4,9 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Steamworks
namespace Steamworks.ServerList
{
/// <summary>
/// Not for reuse by newbs
/// </summary>
public class ServerListHistory : BaseServerList
public class History : Base
{
internal override void LaunchQuery()
{

View File

@ -4,12 +4,9 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Steamworks
namespace Steamworks.ServerList
{
/// <summary>
/// Not for reuse by newbs
/// </summary>
public class ServerListInternet : BaseServerList
public class Internet : Base
{
internal override void LaunchQuery()
{

View File

@ -4,12 +4,9 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Steamworks
namespace Steamworks.ServerList
{
/// <summary>
/// Not for reuse by newbs
/// </summary>
public class ServerListLan : BaseServerList
public class LocalNetwork : Base
{
internal override void LaunchQuery()
{

View File

@ -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 );
}
}
*/
}