ApplicationHost.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // System.Web.Hosting.ApplicationHost
  3. //
  4. // Author:
  5. // Patrik Torstensson ([email protected])
  6. // (class signature from Bob Smith <[email protected]> (C) )
  7. //
  8. using System;
  9. using System.Runtime.Remoting;
  10. namespace System.Web.Hosting {
  11. public sealed class ApplicationHost {
  12. [MonoTODO("object CreateApplicationHost() Implement (dummy implementation right now)")]
  13. public static object CreateApplicationHost(Type HostType, string VirtualPath, string PhysicalPath) {
  14. // Construct and own AppDomain via DomainFactory? Can be good to have control over the web appdomain
  15. // Dummy impl: just return a init object..
  16. // TODO: Save in the created app domain....
  17. System.Threading.Thread.GetDomain().SetData(".ASP.Net.App.VirtualPath", VirtualPath);
  18. System.Threading.Thread.GetDomain().SetData(".ASP.Net.App.Path", PhysicalPath);
  19. // TODO: Set to the install path of the runtime engine....
  20. System.Threading.Thread.GetDomain().SetData(".ASP.Net.App.InstallPath", "");
  21. // TODO: Create a name and id for the application...
  22. // TODO: Copy all of the domain info to our new domain
  23. ObjectHandle obj = System.Threading.Thread.GetDomain().CreateInstance(HostType.Module.Assembly.FullName, HostType.FullName);
  24. return obj.Unwrap();
  25. }
  26. }
  27. }