Exemple #1
0
 void RemoveDesiredPackageVersion(string packageName)
 {
     lock (DesiredPackageVersions)
         if (DesiredPackageVersions.ContainsKey(packageName))
         {
             DesiredPackageVersions.Remove(packageName);
         }
 }
Exemple #2
0
        public void SetDesiredPackageVersion(string packageName, string versionData)
        {
            if (!(versionData != string.Empty))
            {
                throw new ArgumentOutOfRangeException("versionData != string.Empty");
            }
            // TODO: What about deeper check; is this really a version denotation, etc..

            if (versionData == null)
            {
                RemoveDesiredPackageVersion(packageName);
                return;
            }
            lock (DesiredPackageVersions) {
                if (DesiredPackageVersions.ContainsKey(packageName))
                {
                    DesiredPackageVersions[packageName] = versionData;
                }
                else
                {
                    DesiredPackageVersions.Add(packageName, versionData);
                }
            }
        }
Exemple #3
0
 public string GetDesiredPackageVersion(string packageName) => DesiredPackageVersions.ContainsKey(packageName) ? DesiredPackageVersions[packageName] : null;