コード例 #1
0
 internal void RegisterExtensionProcessor(string extension, IExtensionProcessor extensionProcessor)
 {
     if (_fileExtensions.ContainsKey(extension))
     {
         throw new PageAlreadyExistsException(extension);
     }
     _fileExtensions.Add(extension, extensionProcessor);
 }
コード例 #2
0
 public static void RegisterExtensionProcessor(this IPlugin plugin, string extension, IExtensionProcessor extensionProcessor)
 {
     HttpEngine.RegisterExtensionProcessor(plugin, extension, extensionProcessor);
 }
コード例 #3
0
 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);
     }
 }