internal void RegisterExtensionProcessor(string extension, IExtensionProcessor extensionProcessor) { if (_fileExtensions.ContainsKey(extension)) { throw new PageAlreadyExistsException(extension); } _fileExtensions.Add(extension, extensionProcessor); }
public static void RegisterExtensionProcessor(this IPlugin plugin, string extension, IExtensionProcessor extensionProcessor) { HttpEngine.RegisterExtensionProcessor(plugin, extension, extensionProcessor); }
public static void RegisterExtensionProcessor(IPlugin plugin, string extension, IExtensionProcessor extensionProcessor) { if (_httpEngine == null) { throw new HttpEngineNotInitializedException(); } _httpEngine.Logger.LogInfo($"Registering extension processor for '{extension}'"); foreach (var site in _httpEngine._sites) { if (!site.HasPermission(plugin)) { continue; } site.RegisterExtensionProcessor(extension, extensionProcessor); } }