internal PluginConfigAccessor(INamedVersionedUniqueId idEdited, IConfigManagerExtended cfg, object contextObject) { Debug.Assert(cfg != null); _idEdited = idEdited; _configContainer = cfg.Container; _system = _configContainer.GetObjectPluginConfig(cfg.ConfigManager.SystemConfiguration, _idEdited); _user = _configContainer.GetObjectPluginConfig(cfg.ConfigManager.UserConfiguration, _idEdited); _context = _configContainer.GetObjectPluginConfig(contextObject, _idEdited); }
IObjectPluginConfig Get(object o) { return(_configContainer.GetObjectPluginConfig(o, _idEdited)); }
/// <summary> /// Gets (creates it if needed) an easy to use <see cref="IObjectPluginConfig"/> that acts as a standard name-value dictionary. /// </summary> /// <param name="c">This <see cref="IConfigContainer"/> object.</param> /// <param name="o">Object that carries the properties.</param> /// <param name="p">Plugin identifier.</param> /// <returns>>An easy accessor for the object/plugin couple.</returns> public static IObjectPluginConfig GetObjectPluginConfig(this IConfigContainer c, object o, INamedVersionedUniqueId p) { return(c.GetObjectPluginConfig(o, p, true)); }