internal void Add(Package package)
 {
     if (!_cultures.Contains(package.Culture.ToLowerInvariant()))
     {
         _list.Add(package);
         _cultures.Add(package.Culture.ToLowerInvariant(), package);
     }
     else
     {
         Debug.Fail("Package with culture " + package.Culture + " has already been added.");
     }
 }
Exemple #2
0
        internal void AddPackage(Package package)
        {
            if (package == null || String.IsNullOrEmpty(package.Culture))
                throw new ArgumentNullException("package");

            if (!_cultures.Contains(package.Culture.ToLowerInvariant()))
            {
                _packages.Add(package);
                _cultures.Add(package.Culture.ToLowerInvariant(), package);
            }
            else
            {
                Debug.WriteLine(String.Format(CultureInfo.CurrentCulture, "A package with culture '{0}' has already been added to product '{1}'", package.Culture.ToLowerInvariant(), ProductCode));
            }
        }
 internal void AddPackage(Package package)
 {
     if ((package == null) || string.IsNullOrEmpty(package.Culture))
     {
         throw new ArgumentNullException("package");
     }
     if (!this.cultures.Contains(package.Culture.ToLowerInvariant()))
     {
         this.packages.Add(package);
         this.cultures.Add(package.Culture.ToLowerInvariant(), package);
     }
 }