Remove FluentResults, documentation
This commit is contained in:
@@ -1,16 +1,58 @@
|
||||
using FluentResults;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Dynamic.ScriptHandling;
|
||||
|
||||
/// <summary>
|
||||
/// A script set is a collection of scripts that can be accessed by a key.
|
||||
/// We can add, remove, and clear scripts from the set.
|
||||
/// This is generally used for volatile scripts.
|
||||
/// </summary>
|
||||
public interface IScriptSet : IEnumerable<ScriptContainer>
|
||||
{
|
||||
Result<ScriptContainer> Add(Script script);
|
||||
Result<ScriptContainer?> Add(string scriptKey);
|
||||
ScriptContainer? Get(string scriptKey);
|
||||
void Remove(string scriptKey);
|
||||
/// <summary>
|
||||
/// Adds a script to the set. If the script with that name already exists in this set, this
|
||||
/// makes that script stack instead. The return value here is that script.
|
||||
/// </summary>
|
||||
ScriptContainer Add(Script script);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a script with a name to the set. If the script with that name already exists in this
|
||||
/// set, this makes that script stack instead. The return value here is that script.
|
||||
/// </summary>
|
||||
ScriptContainer? Add(StringKey scriptKey);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a script from the set using its unique name.
|
||||
/// </summary>
|
||||
ScriptContainer? Get(StringKey scriptKey);
|
||||
|
||||
/// <summary>
|
||||
/// Removes a script from the set using its unique name.
|
||||
/// </summary>
|
||||
void Remove(StringKey scriptKey);
|
||||
|
||||
/// <summary>
|
||||
/// Clears all scripts from the set.
|
||||
/// </summary>
|
||||
void Clear();
|
||||
void Contains(string scriptKey);
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the set has a script with the given name.
|
||||
/// </summary>
|
||||
void Contains(StringKey scriptKey);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a script from the set at a specific index.
|
||||
/// </summary>
|
||||
ScriptContainer At(int index);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of scripts in the set.
|
||||
/// </summary>
|
||||
int Count { get; }
|
||||
IEnumerable<string> GetScriptNames();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the names of all scripts in the set.
|
||||
/// </summary>
|
||||
IEnumerable<StringKey> GetScriptNames();
|
||||
}
|
||||
Reference in New Issue
Block a user