Skip to content

Commit

Permalink
Convert gallery to C#6.0 #2815
Browse files Browse the repository at this point in the history
Update latest code from `dev` as well.
  • Loading branch information
maartenba committed Jan 14, 2016
1 parent 1a94d19 commit c420763
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/NuGetGallery/NuGetGallery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@
<Compile Include="Services\PackageDeleteService.cs" />
<Compile Include="Services\PackageFileService.cs" />
<Compile Include="Filters\RequireSslAttribute.cs" />
<Compile Include="Services\PackageIdAndTitleValidationService.cs" />
<Compile Include="Services\IPackageNamingConflictValidator.cs" />
<Compile Include="Services\PackageNamingConflictValidator.cs" />
<Compile Include="Services\PackageSearchResults.cs" />
<Compile Include="Services\JsonAggregateStatsService.cs" />
Expand Down
4 changes: 2 additions & 2 deletions src/NuGetGallery/Services/PackageNamingConflictValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public bool TitleConflictsWithExistingRegistrationId(string registrationId, stri
{
if (string.IsNullOrEmpty(registrationId))
{
throw new ArgumentNullException("registrationId");
throw new ArgumentNullException(nameof(registrationId));
}

if (!string.IsNullOrEmpty(packageTitle))
Expand All @@ -50,7 +50,7 @@ public bool IdConflictsWithExistingPackageTitle(string registrationId)
{
if (string.IsNullOrEmpty(registrationId))
{
throw new ArgumentNullException("registrationId");
throw new ArgumentNullException(nameof(registrationId));
}

registrationId = registrationId.ToLowerInvariant();
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery/Services/PackageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ private static void ValidateSupportedFrameworks(string[] supportedFrameworks)
if (invalidPortableFramework != null)
{
throw new EntityException(
"The package framework '{0}' is not supported. Frameworks within the portable profile are not allowed to have profiles themselves.", invalidPortableFramework);
Strings.InvalidPortableFramework, invalidPortableFramework);
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/NuGetGallery/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/NuGetGallery/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -362,4 +362,7 @@ The {2} Team</value>
<data name="NewRegistrationIdMatchesExistingPackageTitle" xml:space="preserve">
<value>The ID of your package, '{0}', is similar to the title of an existing package, which can cause confusion with our users. Please modify the ID of your package and try uploading again.</value>
</data>
<data name="InvalidPortableFramework" xml:space="preserve">
<value>The package framework '{0}' is not supported. Frameworks within the portable profile are not allowed to have profiles themselves.</value>
</data>
</root>

0 comments on commit c420763

Please sign in to comment.