Add first SourceCFG skeleton draft and test config

This commit is contained in:
Mathias Lui 2022-05-21 16:47:42 +02:00
parent 07d2a098b5
commit 4e450fc921
5 changed files with 58 additions and 2 deletions

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SteamShared.SourceConfig
{
public class SourceCFG
{
/// <summary>
/// Gets or sets a list of concommands or convars in this CFG-file.
/// </summary>
public List<SourceCFGCommand> Commands { get; set; }
}
}

View file

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SteamShared.SourceConfig
{
public class SourceCFGCommand : SourceCFGCommandBase
{
public string? CommandName { get; set; }
/// <summary>
/// Gets or sets the values of this command.
/// This can be a value or another command, for example when using the 'alias' command.
/// </summary>
public List<SourceCFGCommandBase> CommandValues { get; set; }
}
}

View file

@ -4,9 +4,9 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SteamShared
namespace SteamShared.SourceConfig
{
public class SourceCFG
public class SourceCFGCommandBase
{
}
}

View file

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SteamShared.SourceConfig
{
public class SourceCFGCommandValue : SourceCFGCommandBase
{
public string? Value { get; set; }
}
}

View file

@ -0,0 +1,7 @@
test_cvar 5
test_cvar2 6;test_cvar3 "7
test_command
// some comment
test_command2; test_command3 // another comment
test_cvar "test_cvar4 8; test_cvar5 9";test_command
//test comment