public static JavaScriptHostingConfig AddPlugin(this JavaScriptHostingConfig config, IPluginInstaller plugin)
 {
     return(config.AddPlugin((name) =>
     {
         if (plugin.Name == name)
         {
             return plugin;
         }
         return null;
     }));
 }
예제 #2
0
        public static JavaScriptHostingConfig EnableHosting(this JavaScriptHostingConfig config, ResolveConfigFunction resolve)
        {
            ModuleHosting hosting = new ModuleHosting(resolve);

            return(config.AddPlugin(hosting));
        }
 public static JavaScriptHostingConfig AddPlugin <T>(this JavaScriptHostingConfig config) where T : IPluginInstaller, new()
 {
     return(config.AddPlugin(new T()));
 }