Beispiel #1
0
        public void OnItemSaving(object sender, EventArgs args)
        {
            try
            {
                if (!SpeedyGenerationSettings.ShouldRegenerateOnEachSave())
                {
                    return;
                }

                Diagnostics.Log.Info("SpeedyPageOnSaveEvent running", this);

                var item = Event.ExtractParameter(args, 0) as Item;

                _criticalCSSRepository.UpdateCriticalCSS(item, Database);
            }
            catch (Exception ex)
            {
                Diagnostics.Log.Error("Speedy OnItemSaving is falling over", ex, this);
            }
        }