From 28b07c6dda9602f378585a8abe34ad13bca6fe8c Mon Sep 17 00:00:00 2001 From: Ryu Yu Date: Sun, 11 Jul 2021 22:42:55 -0700 Subject: [PATCH] Adding stubbed definition for missing DI objects. --- src/AccountDeleter/AccountDeleter.csproj | 1 + src/AccountDeleter/EmptyFeatureFlagService.cs | 264 ++++++++++++++++++ src/AccountDeleter/EmptyIndexingService.cs | 5 +- src/AccountDeleter/Job.cs | 1 + 4 files changed, 270 insertions(+), 1 deletion(-) create mode 100644 src/AccountDeleter/EmptyFeatureFlagService.cs diff --git a/src/AccountDeleter/AccountDeleter.csproj b/src/AccountDeleter/AccountDeleter.csproj index 6f3ba029eb..b58b9e1f6a 100644 --- a/src/AccountDeleter/AccountDeleter.csproj +++ b/src/AccountDeleter/AccountDeleter.csproj @@ -54,6 +54,7 @@ + diff --git a/src/AccountDeleter/EmptyFeatureFlagService.cs b/src/AccountDeleter/EmptyFeatureFlagService.cs new file mode 100644 index 0000000000..69dc9622ac --- /dev/null +++ b/src/AccountDeleter/EmptyFeatureFlagService.cs @@ -0,0 +1,264 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using NuGet.Services.Entities; +using System; +using System.Collections.Generic; + +namespace NuGetGallery.AccountDeleter +{ + public class EmptyFeatureFlagService : IFeatureFlagService + { + public bool AreDynamicODataCacheDurationsEnabled() + { + throw new NotImplementedException(); + } + + public bool AreEmbeddedIconsEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool AreEmbeddedReadmesEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool ArePatternSetTfmHeuristicsEnabled() + { + //Until this feature is enabled by default, we will assume it is turned off here. + //This is the only used feature flag that was added. + return false; + } + + public bool IsABTestingEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool IsAdvancedSearchEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool IsAlternateStatisticsSourceEnabled() + { + throw new NotImplementedException(); + } + + public bool IsAsyncAccountDeleteEnabled() + { + throw new NotImplementedException(); + } + + public bool IsDeletePackageApiEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool IsDisplayBannerEnabled() + { + throw new NotImplementedException(); + } + + public bool IsDisplayFuGetLinksEnabled() + { + throw new NotImplementedException(); + } + + public bool IsDisplayPackagePageV2Enabled(User user) + { + throw new NotImplementedException(); + } + + public bool IsDisplayVulnerabilitiesEnabled() + { + throw new NotImplementedException(); + } + + public bool IsForceFlatContainerIconsEnabled() + { + throw new NotImplementedException(); + } + + public bool IsGet2FADismissFeedbackEnabled() + { + throw new NotImplementedException(); + } + + public bool IsGitHubUsageEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool IsGravatarProxyEnabled() + { + throw new NotImplementedException(); + } + + public bool IsImageAllowlistEnabled() + { + throw new NotImplementedException(); + } + + public bool IsLicenseMdRenderingEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool IsManageDeprecationApiEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool IsManageDeprecationEnabled(User user, PackageRegistration registration) + { + throw new NotImplementedException(); + } + + public bool IsManageDeprecationEnabled(User user, IEnumerable allVersions) + { + throw new NotImplementedException(); + } + + public bool IsManagePackagesVulnerabilitiesEnabled() + { + throw new NotImplementedException(); + } + + public bool IsMarkdigMdRenderingEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataDatabaseReadOnlyEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV1FindPackagesByIdCountNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV1FindPackagesByIdNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV1GetAllCountEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV1GetAllEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV1GetSpecificNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV1SearchCountNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV1SearchNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV2FindPackagesByIdCountNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV2FindPackagesByIdNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV2GetAllCountNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV2GetAllNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV2GetSpecificNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV2SearchCountNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsODataV2SearchNonHijackedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsPackageDependentsEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool IsPackageRenamesEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool IsPackagesAtomFeedEnabled() + { + throw new NotImplementedException(); + } + + public bool IsPreviewHijackEnabled() + { + throw new NotImplementedException(); + } + + public bool IsSearchSideBySideEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool IsSelfServiceAccountDeleteEnabled() + { + throw new NotImplementedException(); + } + + public bool IsShowEnable2FADialogEnabled() + { + throw new NotImplementedException(); + } + + public bool IsShowReportAbuseSafetyChangesEnabled() + { + throw new NotImplementedException(); + } + + public bool IsTyposquattingEnabled() + { + throw new NotImplementedException(); + } + + public bool IsTyposquattingEnabled(User user) + { + throw new NotImplementedException(); + } + + public bool ProxyGravatarEnSubdomain() + { + throw new NotImplementedException(); + } + } +} diff --git a/src/AccountDeleter/EmptyIndexingService.cs b/src/AccountDeleter/EmptyIndexingService.cs index f1215be675..16c3a115fc 100644 --- a/src/AccountDeleter/EmptyIndexingService.cs +++ b/src/AccountDeleter/EmptyIndexingService.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/src/AccountDeleter/Job.cs b/src/AccountDeleter/Job.cs index 082f4c949d..1a0ca32a2b 100644 --- a/src/AccountDeleter/Job.cs +++ b/src/AccountDeleter/Job.cs @@ -135,6 +135,7 @@ protected void ConfigureGalleryServices(IServiceCollection services) services.AddScoped(); services.AddScoped(); + services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped();