Remove FluentResults, documentation

This commit is contained in:
2024-07-28 12:52:17 +02:00
parent 5d6149b18b
commit 10f411f076
25 changed files with 224 additions and 44 deletions

View File

@@ -3,25 +3,29 @@ using System.Diagnostics.CodeAnalysis;
namespace PkmnLib.Dynamic.ScriptHandling;
/// <summary>
/// A holder class for a script. This is used so we can cache a list of these, and iterate over them, even when
/// the underlying script changes.
/// </summary>
public class ScriptContainer : IEnumerable<ScriptContainer>
{
private Script? _script = null;
/// <summary>
/// Whether this container is empty.
/// </summary>
[MemberNotNullWhen(false, nameof(ScriptHandling.Script))]
public bool IsEmpty => _script is null;
public Script? Script
{
get => _script;
set => _script = value;
}
public bool IsEmpty => Script is null;
/// <summary>
/// The script in this container.
/// </summary>
public Script? Script { get; set; } = null;
/// <inheritdoc />
public IEnumerator<ScriptContainer> GetEnumerator()
{
yield return this;
}
IEnumerator IEnumerable.GetEnumerator()
{