public void Remove (Dependency dep)
		{
			List.Remove (dep);
		}
		public void Add (Dependency dep)
		{
			List.Add (dep);
		}
示例#3
0
 /// <summary>
 /// Adds a dependency to the collection
 /// </summary>
 /// <param name='dep'>
 /// The dependency to add.
 /// </param>
 public void Add(Dependency dep)
 {
     List.Add(dep);
 }
示例#4
0
 /// <summary>
 /// Remove the specified dependency.
 /// </summary>
 /// <param name='dep'>
 /// Dependency to remove.
 /// </param>
 public void Remove(Dependency dep)
 {
     List.Remove(dep);
 }
示例#5
0
        internal void ResolveDependency(IProgressMonitor monitor, Dependency dep, AddinPackage parentPackage, PackageCollection toInstall, PackageCollection toUninstall, PackageCollection installedRequired, DependencyCollection unresolved)
        {
            AddinDependency adep = dep as AddinDependency;
            if (adep == null)
                return;

            string nsid = Addin.GetFullId (parentPackage.Addin.Namespace, adep.AddinId, null);

            foreach (Package p in toInstall) {
                AddinPackage ap = p as AddinPackage;
                if (ap != null) {
                    if (Addin.GetIdName (ap.Addin.Id) == nsid && ((AddinInfo)ap.Addin).SupportsVersion (adep.Version))
                        return;
                }
            }

            ArrayList addins = new ArrayList ();
            addins.AddRange (service.Registry.GetAddins ());
            addins.AddRange (service.Registry.GetAddinRoots ());

            foreach (Addin addin in addins) {
                if (Addin.GetIdName (addin.Id) == nsid && addin.SupportsVersion (adep.Version)) {
                    AddinPackage p = AddinPackage.FromInstalledAddin (addin);
                    if (!installedRequired.Contains (p))
                        installedRequired.Add (p);
                    return;
                }
            }

            AddinRepositoryEntry[] avaddins = service.Repositories.GetAvailableAddins ();
            foreach (PackageRepositoryEntry avAddin in avaddins) {
                if (Addin.GetIdName (avAddin.Addin.Id) == nsid && ((AddinInfo)avAddin.Addin).SupportsVersion (adep.Version)) {
                    toInstall.Add (AddinPackage.FromRepository (avAddin));
                    return;
                }
            }
            unresolved.Add (adep);
        }