/// <summary> /// Initializes a new instance of the <see cref="DefaultCachingProvider"/> class. /// </summary> /// <param name="registerForCleanup">callback for files which need to be cleaned up.</param> public InvalidatingCachingProvider(Action<string> registerForCleanup) { _registerForCleanup = registerForCleanup ?? (item => RazorEngine.Compilation.CrossAppDomainCleanUp.RegisterCleanup(item, false)); _loader = new TypeLoader(AppDomain.CurrentDomain, _assemblies); }
/// <summary> /// Initialises a new instance of <see cref="InstanceContext"/>. /// </summary> /// <param name="loader">The type loader.</param> /// <param name="templateType">The template type.</param> internal InstanceContext(TypeLoader loader, Type templateType) { Contract.Requires(loader != null); Contract.Requires(templateType != null); Loader = loader; TemplateType = templateType; }
/// <summary> /// Initializes a new instance of the <see cref="DefaultCachingProvider"/> class. /// </summary> public DefaultCachingProvider() { _loader = new TypeLoader(AppDomain.CurrentDomain, _assemblies); }
/// <summary> /// Initializes a new instance of the <see cref="DefaultCachingProvider"/> class. /// </summary> /// <param name="registerForCleanup">callback for files which need to be cleaned up.</param> public InvalidatingCachingProvider(Action <string> registerForCleanup) { _registerForCleanup = registerForCleanup; _loader = new TypeLoader(AppDomain.CurrentDomain, _assemblies); }