public DeletePackageViewModel(Package package, ReportPackageReason[] reportOtherPackageReasons)
     : base(package)
 {
     DeletePackagesRequest = new DeletePackagesRequest
     {
         Packages = new List<string> { string.Format(CultureInfo.InvariantCulture, "{0}|{1}", package.PackageRegistration.Id, package.Version) },
         ReasonChoices = reportOtherPackageReasons
     };
 }
 public void TrackUserPackageDeleteExecuted(int packageKey, string packageId, string packageVersion, ReportPackageReason reason, bool success)
 {
     throw new NotImplementedException();
 }
Beispiel #3
0
        public void TrackUserPackageDeleteExecuted(int packageKey, string packageId, string packageVersion, ReportPackageReason reason, bool success)
        {
            if (packageId == null)
            {
                throw new ArgumentNullException(nameof(packageId));
            }

            if (packageVersion == null)
            {
                throw new ArgumentNullException(nameof(packageVersion));
            }

            TrackMetric(Events.UserPackageDeleteExecuted, 1, properties => {
                properties.Add(PackageKey, packageKey.ToString());
                properties.Add(PackageId, packageId);
                properties.Add(PackageVersion, packageVersion);
                properties.Add(ReportPackageReason, reason.ToString());
                properties.Add(Success, success.ToString());
            });
        }