Пример #1
0
        public bool TryGetExtensionPointConfiguration(string extensionPointId, out IExtensionPointConfiguration pointConfiguration)
        {
            Enforce.ArgumentNotNullOrEmpty(extensionPointId, "extensionPointId");

            IBundle bundle;

            if (_bundleByExtensionPointId.TryGetValue(extensionPointId, out bundle))
            {
                foreach (IExtensionPointConfiguration cfg in bundle.ContributedExtensionPoints)
                {
                    if (cfg.Id == extensionPointId)
                    {
                        pointConfiguration = cfg;
                        return(true);
                    }
                }
                throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Expected extension point configuration element with bundleId {0} to be contained in bundle with bundleId {1}.", extensionPointId, bundle.Id));
            }
            pointConfiguration = null;
            return(false);
        }
 public bool TryGetExtensionPointConfiguration(string extensionPointId, out IExtensionPointConfiguration pointConfiguration)
 {
     return(_bundleService.TryGetExtensionPointConfiguration(extensionPointId, out pointConfiguration));
 }
Пример #3
0
 public ExtensionPoint(IExtensionPointConfiguration cfg)
 {
     _configElement = cfg;
 }