/// <summary> /// Gets the format to apply to the specified plugin. /// </summary> /// <remarks> /// Ths return <see cref="PluginFormat"/> is the result of merging a formats for the plugin /// from all registered providers. In case where format properties conflict, the lsat one to /// change the property wins. /// </remarks> /// <param name="p_strPluginName">The name of the plugin for which to retrieve the plugin format.</param> /// <returns>The format to apply to the specified plugin.</returns> public PluginFormat GetFormat(string p_strPluginName) { List<PluginFormat> lstFormats = new List<PluginFormat>(); foreach (IPluginFormatProvider pfpProvider in m_setProviders) if (pfpProvider.HasFormat(p_strPluginName)) lstFormats.Add(pfpProvider.GetFormat(p_strPluginName)); lstFormats.Sort(); PluginFormat pftMergedFormat = new PluginFormat(); for (Int32 i = 0; i < lstFormats.Count; pftMergedFormat.Merge(lstFormats[i++])) ; return pftMergedFormat; }
/// <summary> /// Gets the format to apply to the specified plugin. /// </summary> /// <remarks> /// Ths return <see cref="PluginFormat" /> is the result of merging a formats for the plugin /// from all registered providers. In case where format properties conflict, the lsat one to /// change the property wins. /// </remarks> /// <param name="p_strPluginName">The name of the plugin for which to retrieve the plugin format.</param> /// <returns>The format to apply to the specified plugin.</returns> public PluginFormat GetFormat(string p_strPluginName) { var lstFormats = new List<PluginFormat>(); foreach (var pfpProvider in m_setProviders) { if (pfpProvider.HasFormat(p_strPluginName)) { lstFormats.Add(pfpProvider.GetFormat(p_strPluginName)); } } lstFormats.Sort(); var pftMergedFormat = new PluginFormat(); for (var i = 0; i < lstFormats.Count; pftMergedFormat.Merge(lstFormats[i++])) {} return pftMergedFormat; }