/// <summary> /// Allows a client to retrieve all of the configurations to be displayed in a configuration properties window, or for other purposes. All SnapIns should listen for the for the EnumeratingConfigurations event, and add any configurations to the event as needed. /// </summary> /// <param name="configurations"></param> /// <returns></returns> public XmlConfiguration[] EnumConfigurations(params XmlConfiguration[] configurations) { XmlConfigurationManagerEventArgs e = new XmlConfigurationManagerEventArgs(configurations); this.OnEnumeratingConfigurations(this, e); return(e.Configurations.ToArray()); }
/// <summary> /// Allows a client to retrieve all of the configurations to be displayed in a configuration properties window, or for other purposes. All SnapIns should listen for the for the EnumeratingConfigurations event, and add any configurations to the event as needed. /// </summary> /// <param name="configurations">An array of configurations that can be initially added so that the event listeners may filter them.</param> /// <returns></returns> public static XmlConfiguration[] EnumConfigurations(params XmlConfiguration[] configurations) { if (configurations == null) configurations = new XmlConfiguration[] { }; XmlConfigurationManagerEventArgs e = new XmlConfigurationManagerEventArgs(configurations); OnEnumeratingConfigurations(null, e); return e.Configurations.ToArray(); }
/// <summary> /// Raises the EnumeratingConfigurations event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnEnumeratingConfigurations(object sender, XmlConfigurationManagerEventArgs e) { try { if (this.EnumeratingConfigurations != null) this.EnumeratingConfigurations(sender, e); } catch(Exception ex) { System.Diagnostics.Debug.WriteLine(ex); } }
/// <summary> /// Raises the EnumeratingConfigurations event. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void OnEnumeratingConfigurations(object sender, XmlConfigurationManagerEventArgs e) { try { if (EnumeratingConfigurations != null) EnumeratingConfigurations(sender, e); } catch (Exception ex) { Log.WriteLine(ex); } }
/// <summary> /// Raises the EnumeratingConfigurations event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnEnumeratingConfigurations(object sender, XmlConfigurationManagerEventArgs e) { try { if (this.EnumeratingConfigurations != null) { this.EnumeratingConfigurations(sender, e); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); } }
/// <summary> /// Allows a client to retrieve all of the configurations to be displayed in a configuration properties window, or for other purposes. All SnapIns should listen for the for the EnumeratingConfigurations event, and add any configurations to the event as needed. /// </summary> /// <param name="configurations"></param> /// <returns></returns> public XmlConfiguration[] EnumConfigurations(params XmlConfiguration[] configurations) { XmlConfigurationManagerEventArgs e = new XmlConfigurationManagerEventArgs(configurations); this.OnEnumeratingConfigurations(this, e); return e.Configurations.ToArray(); }
/// <summary> /// Occurs when the configuration providers manager enumerates configuration files to display them. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected virtual void OnConfigurationProvidersManagerEnumeratingConfigurations(object sender, XmlConfigurationManagerEventArgs e) { e.Configurations.Add(this.Configuration); }