添加项目文件。

This commit is contained in:
Zel
2025-01-22 23:31:03 +08:00
parent 1b8ba6771f
commit 2ae76476fb
894 changed files with 774558 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using TightWiki.Engine.Library.Interfaces;
using TightWiki.Models;
using TightWiki.Repository;
namespace TightWiki.Engine.Implementation
{
/// <summary>
/// Handles wiki completion events.
/// </summary>
public class CompletionHandler : ICompletionHandler
{
/// <summary>
/// Handles wiki completion events. Is called when the wiki processing competes for a given page.
/// </summary>
/// <param name="state">Reference to the wiki state object</param>
public void Complete(ITightEngineState state)
{
if (GlobalConfiguration.RecordCompilationMetrics)
{
StatisticsRepository.InsertCompilationStatistics(state.Page.Id,
state.ProcessingTime.TotalMilliseconds,
state.MatchCount,
state.ErrorCount,
state.OutgoingLinks.Count,
state.Tags.Count,
state.HtmlResult.Length,
state.Page.Body.Length);
}
}
}
}