[System.Configuration] Rename method parameters to match .NET contract
[mono-project.git] / mcs / class / System.Configuration / System.Configuration.Internal / DelegatingConfigHost.cs
blobdb86289ba1ac218b2a63b6829701f3990422c66a
1 //
2 // System.Configuration.Internal.IConfigErrorInfo.cs
3 //
4 // Authors:
5 // Lluis Sanchez Gual (lluis@novell.com)
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.
26 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
30 using System;
31 using System.IO;
32 using System.Security;
34 namespace System.Configuration.Internal
36 public class DelegatingConfigHost: IInternalConfigHost
38 IInternalConfigHost host;
40 protected DelegatingConfigHost ()
44 protected IInternalConfigHost Host {
45 get { return host; }
46 set { host = value; }
49 public virtual object CreateConfigurationContext (string configPath, string locationSubPath)
51 return host.CreateConfigurationContext (configPath, locationSubPath);
54 public virtual object CreateDeprecatedConfigContext (string configPath)
56 return host.CreateDeprecatedConfigContext (configPath);
59 public virtual string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection)
61 return host.DecryptSection (encryptedXml, protectionProvider, protectedConfigSection);
64 public virtual void DeleteStream (string streamName)
66 host.DeleteStream (streamName);
69 public virtual string EncryptSection (string clearTextXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection)
71 return host.EncryptSection (clearTextXml, protectionProvider, protectedConfigSection);
74 public virtual string GetConfigPathFromLocationSubPath (string configPath, string locationSubPath)
76 return host.GetConfigPathFromLocationSubPath (configPath, locationSubPath);
79 public virtual Type GetConfigType (string typeName, bool throwOnError)
81 return host.GetConfigType (typeName, throwOnError);
84 public virtual string GetConfigTypeName (Type t)
86 return host.GetConfigTypeName (t);
89 public virtual void GetRestrictedPermissions (IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady)
91 host.GetRestrictedPermissions (configRecord, out permissionSet, out isHostReady);
94 public virtual string GetStreamName (string configPath)
96 return host.GetStreamName (configPath);
99 public virtual string GetStreamNameForConfigSource (string streamName, string configSource)
101 return host.GetStreamNameForConfigSource (streamName, configSource);
104 public virtual object GetStreamVersion (string streamName)
106 return host.GetStreamVersion (streamName);
109 public virtual IDisposable Impersonate ()
111 return host.Impersonate ();
114 public virtual void Init (IInternalConfigRoot configRoot, params object[] hostInitParams)
116 host.Init (configRoot, hostInitParams);
119 public virtual void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot configRoot, params object[] hostInitConfigurationParams)
121 host.InitForConfiguration (ref locationSubPath, out configPath, out locationConfigPath, configRoot, hostInitConfigurationParams);
124 public virtual bool IsAboveApplication (string configPath)
126 return host.IsAboveApplication (configPath);
129 public virtual bool IsConfigRecordRequired (string configPath)
131 return host.IsConfigRecordRequired (configPath);
134 public virtual bool IsDefinitionAllowed (string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition)
136 return host.IsDefinitionAllowed (configPath, allowDefinition, allowExeDefinition);
139 public virtual bool IsInitDelayed (IInternalConfigRecord configRecord)
141 return host.IsInitDelayed (configRecord);
144 public virtual bool IsFile (string streamName)
146 return host.IsFile (streamName);
149 public virtual bool IsFullTrustSectionWithoutAptcaAllowed (IInternalConfigRecord configRecord)
151 return host.IsFullTrustSectionWithoutAptcaAllowed (configRecord);
154 public virtual bool IsLocationApplicable (string configPath)
156 return host.IsLocationApplicable (configPath);
159 public virtual bool IsRemote {
160 get { return host.IsRemote; }
163 public virtual bool IsSecondaryRoot (string configPath)
165 return host.IsSecondaryRoot (configPath);
168 public virtual bool IsTrustedConfigPath (string configPath)
170 return host.IsTrustedConfigPath (configPath);
173 public virtual Stream OpenStreamForRead (string streamName)
175 return host.OpenStreamForRead (streamName);
178 public virtual Stream OpenStreamForRead (string streamName, bool assertPermissions)
180 return host.OpenStreamForRead (streamName, assertPermissions);
183 public virtual Stream OpenStreamForWrite (string streamName, string templateStreamName, ref object writeContext)
185 return host.OpenStreamForWrite (streamName, templateStreamName, ref writeContext);
188 public virtual Stream OpenStreamForWrite (string streamName, string templateStreamName, ref object writeContext, bool assertPermissions)
190 return host.OpenStreamForWrite (streamName, templateStreamName, ref writeContext, assertPermissions);
193 public virtual bool PrefetchAll (string configPath, string streamName)
195 return host.PrefetchAll (configPath, streamName);
198 public virtual bool PrefetchSection (string sectionGroupName, string sectionName)
200 return host.PrefetchSection (sectionGroupName, sectionName);
203 public virtual void RequireCompleteInit (IInternalConfigRecord configRecord)
205 host.RequireCompleteInit (configRecord);
208 public virtual object StartMonitoringStreamForChanges (string streamName, StreamChangeCallback callback)
210 return host.StartMonitoringStreamForChanges (streamName, callback);
213 public virtual void StopMonitoringStreamForChanges (string streamName, StreamChangeCallback callback)
215 host.StopMonitoringStreamForChanges (streamName, callback);
218 public virtual void VerifyDefinitionAllowed (string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition, IConfigErrorInfo errorInfo)
220 host.VerifyDefinitionAllowed (configPath, allowDefinition, allowExeDefinition, errorInfo);
223 public virtual void WriteCompleted (string streamName, bool success, object writeContext)
225 host.WriteCompleted (streamName, success, writeContext);
228 public virtual void WriteCompleted (string streamName, bool success, object writeContext, bool assertPermissions)
230 host.WriteCompleted (streamName, success, writeContext, assertPermissions);
233 public virtual bool SupportsChangeNotifications {
234 get { return host.SupportsChangeNotifications; }
237 public virtual bool SupportsLocation {
238 get { return host.SupportsLocation; }
241 public virtual bool SupportsPath {
242 get { return host.SupportsPath; }
245 public virtual bool SupportsRefresh {
246 get { return host.SupportsRefresh; }