Skip to content

Commit

Permalink
(maint) Move GetStorePath before deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
corbob committed May 10, 2023
1 parent 8d1c7e2 commit a17a33d
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,20 +257,6 @@ public void Remove(IPackageMetadata package)
_fileSystem.DeleteDirectoryChecked(pkgStorePath, recursive: true);
}

#pragma warning disable IDE1006
[Obsolete("This overload is deprecated and will be removed in v3.")]
public ChocolateyPackageInformation get_package_information(IPackageMetadata package)
=> Get(package);

[Obsolete("This overload is deprecated and will be removed in v3.")]
public void save_package_information(ChocolateyPackageInformation packageInformation)
=> Save(packageInformation);

[Obsolete("This overload is deprecated and will be removed in v3.")]
public void remove_package_information(IPackageMetadata package)
=> Remove(package);
#pragma warning restore IDE1006

private static string GetStorePath(IFileSystem fileSystem, string id, NuGetVersion version)
{
var preferredStorePath = fileSystem.CombinePaths(ApplicationParameters.ChocolateyPackageInfoStoreLocation, "{0}.{1}".FormatWith(id, version.ToNormalizedStringChecked()));
Expand Down Expand Up @@ -316,5 +302,19 @@ private static string GetStorePath(IFileSystem fileSystem, string id, NuGetVersi

return preferredStorePath;
}

#pragma warning disable IDE1006
[Obsolete("This overload is deprecated and will be removed in v3.")]
public ChocolateyPackageInformation get_package_information(IPackageMetadata package)
=> Get(package);

[Obsolete("This overload is deprecated and will be removed in v3.")]
public void save_package_information(ChocolateyPackageInformation packageInformation)
=> Save(packageInformation);

[Obsolete("This overload is deprecated and will be removed in v3.")]
public void remove_package_information(IPackageMetadata package)
=> Remove(package);
#pragma warning restore IDE1006
}
}

0 comments on commit a17a33d

Please sign in to comment.