Skip to content

Instantly share code, notes, and snippets.

@tslazarov
Created January 3, 2022 12:46
Show Gist options
  • Save tslazarov/038a859a7f9e5af1b86e39ec1f60fbfb to your computer and use it in GitHub Desktop.
Save tslazarov/038a859a7f9e5af1b86e39ec1f60fbfb 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.Configuration;
using Telerik.Sitefinity.Abstractions;
using Telerik.Sitefinity.Configuration;
using Telerik.Sitefinity.Localization;
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)
{
// ...
Res.RegisterResource<ImageOptimizationResources>();
Config.RegisterSection<ImageOptimizationConfig>();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment