DotvvmChildEventCallback

Details

diff --git a/src/Web/Helpers/DotVvmServiceCollectionExtensions.cs b/src/Web/Helpers/DotVvmServiceCollectionExtensions.cs
index 6f0d4f7..21e3d23 100644
--- a/src/Web/Helpers/DotVvmServiceCollectionExtensions.cs
+++ b/src/Web/Helpers/DotVvmServiceCollectionExtensions.cs
@@ -3,10 +3,10 @@ namespace Web.Helpers
     using Castle.MicroKernel.Registration;
     using Castle.Windsor;
     using DotVVM.Framework.ViewModel.Serialization;
+    using Infrastructure;
     using Microsoft.Extensions.DependencyInjection;
     using System.IO;
     using System.Web.Hosting;
-    using Infrastructure;
 
     public static class DotVvmServiceCollectionExtensions
     {
@@ -25,6 +25,7 @@ namespace Web.Helpers
             _windsorContainer.Kernel.Resolver.AddSubResolver(new ServiceCollectionResolver(svc.Services));
 
             svc.Services.AddSingleton<IViewModelLoader>(_ => new WindsorViewModelLoader(_windsorContainer));
+            //svc.Services.AddSingleton<IStaticCommandServiceLoader>(_ => new WindsorStaticCommandServiceLoader(_windsorContainer));
             svc.RegisterDependencies();
             return svc;
         }
diff --git a/src/Web/Infrastructure/WindsorStaticCommandServiceLoader.cs b/src/Web/Infrastructure/WindsorStaticCommandServiceLoader.cs
new file mode 100644
index 0000000..c026e15
--- /dev/null
+++ b/src/Web/Infrastructure/WindsorStaticCommandServiceLoader.cs
@@ -0,0 +1,22 @@
+namespace Web.Infrastructure
+{
+    using Castle.Windsor;
+    using DotVVM.Framework.Hosting;
+    using DotVVM.Framework.Runtime;
+    using System;
+
+    public class WindsorStaticCommandServiceLoader : DefaultStaticCommandServiceLoader
+    {
+        private readonly WindsorContainer _container;
+
+        public WindsorStaticCommandServiceLoader(WindsorContainer container)
+        {
+            _container = container;
+        }
+
+        public override object GetStaticCommandService(Type serviceType, IDotvvmRequestContext context)
+        {
+            return _container.Resolve(serviceType);
+        }
+    }
+}
diff --git a/src/Web/Web.csproj b/src/Web/Web.csproj
index 31601a0..e962560 100644
--- a/src/Web/Web.csproj
+++ b/src/Web/Web.csproj
@@ -206,6 +206,7 @@
     <Compile Include="Helpers\Constants.cs" />
     <Compile Include="Helpers\DotVvmServiceCollectionExtensions.cs" />
     <Compile Include="Infrastructure\ServiceCollectionResolver.cs" />
+    <Compile Include="Infrastructure\WindsorStaticCommandServiceLoader.cs" />
     <Compile Include="Infrastructure\WindsorViewModelLoader.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Startup.cs" />