Beispiel #1
0
        private List <Guid> GetGuidsInManifest(ICollection <ProviderDefinitionDescription> providers, bool addProvider = false)
        {
            List <Guid> guidsInManifest = new List <Guid>();

            foreach (var provider in providers)
            {
                ProviderDefinition providerDef = new ProviderDefinition(provider);

                try
                {
                    if (addProvider)
                    {
                        this.providers.Add(providerDef.Guid, providerDef);
                    }
                }
                catch (ArgumentException e)
                {
                    throw new ArgumentException(string.Format(ProviderAlreadyLoadedMessage, providerDef.Guid), e);
                }

                guidsInManifest.Add(providerDef.Guid);
            }

            return(guidsInManifest);
        }