IInternalConfigHost.cs 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //
  2. // System.Configuration.Internal.IInternalConfigHost.cs
  3. //
  4. // Authors:
  5. // Lluis Sanchez Gual ([email protected])
  6. //
  7. // Permission is hereby granted, free of charge, to any person obtaining
  8. // a copy of this software and associated documentation files (the
  9. // "Software"), to deal in the Software without restriction, including
  10. // without limitation the rights to use, copy, modify, merge, publish,
  11. // distribute, sublicense, and/or sell copies of the Software, and to
  12. // permit persons to whom the Software is furnished to do so, subject to
  13. // the following conditions:
  14. //
  15. // The above copyright notice and this permission notice shall be
  16. // included in all copies or substantial portions of the Software.
  17. //
  18. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  19. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  20. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  21. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  22. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  23. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  24. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  25. //
  26. // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
  27. //
  28. using System;
  29. using System.IO;
  30. using System.Security;
  31. namespace System.Configuration.Internal
  32. {
  33. [System.Runtime.InteropServices.ComVisible (false)]
  34. public interface IInternalConfigHost
  35. {
  36. object CreateConfigurationContext (string configPath, string locationSubPath);
  37. object CreateDeprecatedConfigContext (string configPath);
  38. string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection);
  39. void DeleteStream (string streamName);
  40. string EncryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection);
  41. string GetConfigPathFromLocationSubPath (string configPath, string locatinSubPath);
  42. Type GetConfigType (string typeName, bool throwOnError);
  43. string GetConfigTypeName (Type t);
  44. void GetRestrictedPermissions (IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady);
  45. string GetStreamName (string configPath);
  46. string GetStreamNameForConfigSource (string streamName, string configSource);
  47. object GetStreamVersion (string streamName);
  48. IDisposable Impersonate ();
  49. void Init (IInternalConfigRoot root, params object[] hostInitParams);
  50. void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot root, params object[] hostInitConfigurationParams);
  51. bool IsAboveApplication (string configPath);
  52. bool IsConfigRecordRequired (string configPath);
  53. bool IsDefinitionAllowed (string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition);
  54. bool IsFile (string streamName);
  55. bool IsFullTrustSectionWithoutAptcaAllowed (IInternalConfigRecord configRecord);
  56. bool IsInitDelayed (IInternalConfigRecord configRecord);
  57. bool IsLocationApplicable (string configPath);
  58. bool IsRemote { get; }
  59. bool IsSecondaryRoot (string configPath);
  60. bool IsTrustedConfigPath (string configPath);
  61. Stream OpenStreamForRead (string streamName);
  62. Stream OpenStreamForRead (string streamName, bool assertPermissions);
  63. Stream OpenStreamForWrite (string streamName, string templateStreamName, ref object writeContext);
  64. Stream OpenStreamForWrite (string streamName, string templateStreamName, ref object writeContext, bool assertPermissions);
  65. bool PrefetchAll (string configPath, string streamName);
  66. bool PrefetchSection (string sectionGroupName, string sectionName);
  67. void RequireCompleteInit (IInternalConfigRecord configRecord);
  68. object StartMonitoringStreamForChanges (string streamName, StreamChangeCallback callback);
  69. void StopMonitoringStreamForChanges (string streamName, StreamChangeCallback callback);
  70. void VerifyDefinitionAllowed (string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo);
  71. void WriteCompleted (string streamName, bool success, object writeContext);
  72. void WriteCompleted (string streamName, bool success, object writeContext, bool assertPermissions);
  73. bool SupportsChangeNotifications { get; }
  74. bool SupportsLocation { get; }
  75. bool SupportsPath { get; }
  76. bool SupportsRefresh { get; }
  77. }
  78. }