Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tslazarov/448a15dbd08df82cc25c19f5601c52fc to your computer and use it in GitHub Desktop.
Save tslazarov/448a15dbd08df82cc25c19f5601c52fc to your computer and use it in GitHub Desktop.
Sitefinity Image Optimization
using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using Progress.Sitefinity.ImageOptimization.Utils;
using Telerik.Sitefinity.Abstractions;
namespace Progress.Sitefinity.ImageOptimization
{
/// <summary>
/// Contains the application startup event handlers registering the required components for the packaging module of Sitefinity.
/// </summary>
[ExcludeFromCodeCoverage]
public static class Startup
{
/// <summary>
/// Called before the Asp.Net application is started. Subscribes for the logging and exception handling configuration related events.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static void OnPreApplicationStart()
{
Bootstrapper.Bootstrapped -= Bootstrapper_Bootstrapped;
Bootstrapper.Bootstrapped += Bootstrapper_Bootstrapped;
}
private static void Bootstrapper_Bootstrapped(object sender, EventArgs e)
{
// ...
Startup.InitializeHelperFields();
}
private static void InitializeHelperFields()
{
ImageOptimizationFieldBuilder.CreateRequiredFields();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment