VirtualPathExtension.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.ServiceModel.Activation
  5. {
  6. using System.ServiceModel.Diagnostics.Application;
  7. public sealed class VirtualPathExtension : IExtension<ServiceHostBase>
  8. {
  9. internal VirtualPathExtension(string virtualPath, string applicationVirtualPath, string siteName)
  10. {
  11. this.VirtualPath = virtualPath;
  12. this.ApplicationVirtualPath = applicationVirtualPath;
  13. this.SiteName = siteName;
  14. }
  15. public string ApplicationVirtualPath
  16. {
  17. get;
  18. private set;
  19. }
  20. public string SiteName
  21. {
  22. get;
  23. private set;
  24. }
  25. public string VirtualPath
  26. {
  27. get;
  28. private set;
  29. }
  30. public void Attach(ServiceHostBase owner)
  31. {
  32. }
  33. public void Detach(ServiceHostBase owner)
  34. {
  35. throw FxTrace.Exception.AsError(new InvalidOperationException(SR.GetString(SR.Hosting_VirtualPathExtenstionCanNotBeDetached)));
  36. }
  37. }
  38. }