Last active
June 25, 2020 00:26
-
-
Save soen/5603b9057f35dc1dc025386df6f78fcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sitecore.Pipelines; | |
using Sitecore.StaticAssets.Infrastructure; | |
namespace Sitecore.StaticAssets.Pipelines | |
{ | |
public class InitializeStaticAssetsResolver | |
{ | |
private readonly string _assetPath; | |
public InitializeStaticAssetsResolver(string assetPath) | |
{ | |
_assetPath = assetPath; | |
} | |
public void Process(PipelineArgs args) | |
{ | |
StaticAssets.Initialize(new StaticAssetResolver(Server.MapPath(_assetPath), HttpContext.Current.Cache)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment