protected void InterceptPackageRegistrationMaterialized(PackageRegistration packageRegistration)
        {
            if (packageRegistration == null)
            {
                return;
            }

            int downloadCount;

            if (_downloadCountService.TryGetDownloadCountForPackageRegistration(packageRegistration.Id, out downloadCount))
            {
                packageRegistration.DownloadCount = downloadCount;
            }
        }
예제 #2
0
        protected void InterceptPackageRegistrationMaterialized(PackageRegistration packageRegistration)
        {
            if (packageRegistration == null)
            {
                return;
            }

            int downloadCount;

            if (_downloadCountService.TryGetDownloadCountForPackageRegistration(packageRegistration.Id, out downloadCount))
            {
                if (downloadCount < packageRegistration.DownloadCount)
                {
                    _telemetryService.TrackPackageRegistrationDownloadCountDecreasedFromGallery(packageRegistration.Id, packageRegistration.DownloadCount, downloadCount);
                }

                packageRegistration.DownloadCount = downloadCount;
            }
        }