using ZelWiki.Engine.Library.Interfaces; using ZelWiki.Models; using ZelWiki.Repository; namespace ZelWiki.Engine.Implementation { /// /// Handles wiki completion events. /// public class CompletionHandler : ICompletionHandler { /// /// Handles wiki completion events. Is called when the wiki processing competes for a given page. /// /// Reference to the wiki state object public void Complete(IZelEngineState 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); } } } }