* Added mising XML summaries

* Obsolete code comments cleanup
This commit is contained in:
2025-08-02 03:33:35 +04:00
parent 02e23eefdd
commit 7d1ce6ea22
4 changed files with 58 additions and 166 deletions
+29
View File
@@ -1,11 +1,23 @@
namespace Telegrator.Handlers
{
/// <summary>
/// Represents handler results, allowing to communicate with router and control aspect execution
/// </summary>
public sealed class Result
{
/// <summary>
/// Is result positive
/// </summary>
public bool Positive { get; }
/// <summary>
/// Should router search for next matching handler
/// </summary>
public bool RouteNext { get; }
/// <summary>
/// Exact type that router should search
/// </summary>
public Type? NextType { get; }
internal Result(bool positive, bool routeNext, Type? nextType)
@@ -15,15 +27,32 @@
NextType = nextType;
}
/// <summary>
/// "OK" result
/// </summary>
/// <returns></returns>
public static Result Ok()
=> new Result(true, false, null);
/// <summary>
/// "Somethong went wrong" result
/// </summary>
/// <returns></returns>
public static Result Fault()
=> new Result(false, false, null);
/// <summary>
/// "Search next handler" result
/// </summary>
/// <returns></returns>
public static Result Next()
=> new Result(true, true, null);
/// <summary>
/// "Search next handler of type" result
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
public static Result Next<T>()
=> new Result(true, true, typeof(T));
}