public virtual object CreateDeprecatedConfigContext (string configPath)
{
- throw new NotImplementedException ();
+ return null;
}
public virtual void DeleteStream (string streamName)
#if !TARGET_JVM
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern private static string get_bundled_machine_config ();
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ extern private static string get_bundled_app_config ();
#endif
public virtual Stream OpenStreamForRead (string streamName)
#endif
}
+ if (String.CompareOrdinal (streamName, AppDomain.CurrentDomain.SetupInformation.ConfigurationFile) == 0) {
+#if TARGET_JVM
+ throw new NotImplementedException();
+#else
+ string bundle = get_bundled_app_config ();
+ if (bundle != null)
+ return new MemoryStream (System.Text.Encoding.UTF8.GetBytes (bundle));
+#endif
+ }
+
if (!File.Exists (streamName))
- throw new ConfigurationException ("File '" + streamName + "' not found");
+ return null;
return new FileStream (streamName, FileMode.Open, FileAccess.Read);
}
public override void Init (IInternalConfigRoot root, params object[] hostInitParams)
{
map = (ExeConfigurationFileMap) hostInitParams [0];
+ level = (ConfigurationUserLevel) hostInitParams [1];
}
public override string GetStreamName (string configPath)