Created
December 6, 2012 23:55
-
-
Save emiaj/4229535 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public class SparkPolicyRunner : IActivator | |
| { | |
| private readonly ISparkViewEngine _engine; | |
| private readonly IEnumerable<ISparkPolicy> _policies; | |
| public SparkPolicyRunner(ISparkViewEngine engine, IEnumerable<ISparkPolicy> policies) | |
| { | |
| _engine = engine; | |
| _policies = policies; | |
| } | |
| public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log) | |
| { | |
| _policies.Each(policy => policy.Run(_engine, log)); | |
| } | |
| } | |
| public interface ISparkPolicy | |
| { | |
| void Run(ISparkViewEngine engine, IPackageLog log); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment