Skip to content

Commit 52356db

Browse files
committed
Cleanup unused usings/variables, add file headers
1 parent 75a96ec commit 52356db

52 files changed

Lines changed: 163 additions & 224 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/NuGet.Server.V2.Samples.OwinHost/BasicAuthentication.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
using Microsoft.Owin;
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
24
using System;
35
using System.Collections.Generic;
46
using System.Linq;
57
using System.Security.Claims;
68
using System.Text;
79
using System.Threading.Tasks;
8-
10+
using Microsoft.Owin;
911

1012
namespace NuGet.Server.V2.Samples.OwinHost
1113
{

samples/NuGet.Server.V2.Samples.OwinHost/Controllers/NuGetPrivateODataController.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
using NuGet.Server.Core.Infrastructure;
2-
using NuGet.Server.V2.Controllers;
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Linq;
6-
using System.Text;
7-
using System.Threading.Tasks;
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
84
using System.Web.Http;
9-
using System.Net.Http;
5+
using NuGet.Server.V2.Controllers;
106

117
namespace NuGet.Server.V2.Samples.OwinHost.Controllers
128
{
@@ -20,8 +16,8 @@ public class NuGetPrivateODataController : NuGetODataController
2016
{
2117
public NuGetPrivateODataController()
2218
: base(Program.NuGetPrivateRepository)
23-
//Replace line above with the one below to allow upload/delete for all authenticated users
24-
//: base(Program.NuGetPrivateRepository, new ApiKeyPackageAuthenticationService(false, null))
19+
// Replace line above with the one below to allow upload/delete for all authenticated users
20+
// : base(Program.NuGetPrivateRepository, new ApiKeyPackageAuthenticationService(false, null))
2521
{
2622
}
2723
}

samples/NuGet.Server.V2.Samples.OwinHost/Controllers/NuGetPublicODataController.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
using NuGet.Server.Core.Infrastructure;
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using NuGet.Server.Core.Infrastructure;
25
using NuGet.Server.V2.Controllers;
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Linq;
6-
using System.Text;
7-
using System.Threading.Tasks;
8-
using System.Net.Http;
96

107
namespace NuGet.Server.V2.Samples.OwinHost.Controllers
118
{

samples/NuGet.Server.V2.Samples.OwinHost/Controllers/NuGetVeryPublicODataController.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
using NuGet.Server.Core.Infrastructure;
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using NuGet.Server.Core.Infrastructure;
25
using NuGet.Server.V2.Controllers;
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Linq;
6-
using System.Text;
7-
using System.Threading.Tasks;
8-
using System.Net.Http;
96

107
namespace NuGet.Server.V2.Samples.OwinHost.Controllers
118
{

samples/NuGet.Server.V2.Samples.OwinHost/DictionarySettingsProvider.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
using NuGet.Server.Core.Infrastructure;
2-
using System;
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
34
using System.Collections.Generic;
4-
using System.Linq;
5-
using System.Text;
6-
using System.Threading.Tasks;
5+
using NuGet.Server.Core.Infrastructure;
76

87
namespace NuGet.Server.V2.Samples.OwinHost
98
{

samples/NuGet.Server.V2.Samples.OwinHost/NuGet.Server.V2.Samples.OwinHost.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,19 @@
6363
<HintPath>..\..\packages\Microsoft.Owin.Hosting.3.0.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
6464
<Private>True</Private>
6565
</Reference>
66+
<Reference Include="Microsoft.Web.XmlTransform, Version=2.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
67+
<HintPath>..\..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
68+
<Private>True</Private>
69+
</Reference>
6670
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
6771
<SpecificVersion>False</SpecificVersion>
6872
<HintPath>..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
6973
<Private>True</Private>
7074
</Reference>
75+
<Reference Include="NuGet.Core, Version=2.11.1.812, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
76+
<HintPath>..\..\packages\NuGet.Core.2.11.1\lib\net40-Client\NuGet.Core.dll</HintPath>
77+
<Private>True</Private>
78+
</Reference>
7179
<Reference Include="Owin">
7280
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
7381
<Private>True</Private>

samples/NuGet.Server.V2.Samples.OwinHost/Program.cs

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
using Microsoft.Owin.Hosting;
2-
using NuGet.Server.Core.Infrastructure;
3-
using NuGet.Server.Core.Logging;
4-
using NuGet.Server.V2;
5-
using Owin;
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
64
using System;
75
using System.Collections.Generic;
8-
using System.Data.Services;
9-
using System.IO;
10-
using System.Linq;
11-
using System.Net.Http;
12-
using System.Reflection;
13-
using System.Text;
146
using System.Web.Http;
15-
using System.Web.Http.OData.Extensions;
7+
using Microsoft.Owin.Hosting;
8+
using NuGet.Server.Core.Infrastructure;
9+
using NuGet.Server.Core.Logging;
10+
using Owin;
1611

1712
namespace NuGet.Server.V2.Samples.OwinHost
1813
{
@@ -28,8 +23,8 @@ static void Main(string[] args)
2823
{
2924
var baseAddress = "http://localhost:9000/";
3025

31-
//Set up a common settingsProvider to be used by all repositories.
32-
//If a setting is not present in dictionary default value will be used.
26+
// Set up a common settingsProvider to be used by all repositories.
27+
// If a setting is not present in dictionary default value will be used.
3328
var settings = new Dictionary<string, bool>();
3429
settings.Add("enableDelisting", false); //default=false
3530
settings.Add("enableFrameworkFiltering", false); //default=false
@@ -63,7 +58,7 @@ public void Configuration(IAppBuilder appBuilder)
6358
appBuilder.Use(typeof(BasicAuthentication));
6459

6560
// Configure Web API for self-host.
66-
HttpConfiguration config = new HttpConfiguration();
61+
var config = new HttpConfiguration();
6762
appBuilder.UseWebApi(config);
6863

6964
//Map route for ordinary controllers, this is not neccessary for the NuGet feed.

samples/NuGet.Server.V2.Samples.OwinHost/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
using System.Reflection;
2-
using System.Runtime.CompilerServices;
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System.Reflection;
35
using System.Runtime.InteropServices;
46

57
// General Information about an assembly is controlled through the following

samples/NuGet.Server.V2.Samples.OwinHost/app.config

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup>
44
<runtime>
55
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
66
<dependentAssembly>
7-
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
8-
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
7+
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
8+
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
99
</dependentAssembly>
1010
<dependentAssembly>
11-
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
12-
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
11+
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
12+
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
1313
</dependentAssembly>
1414
<dependentAssembly>
15-
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
16-
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0"/>
15+
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
16+
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
1717
</dependentAssembly>
1818
<dependentAssembly>
19-
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
20-
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0"/>
19+
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
20+
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
2121
</dependentAssembly>
2222
<dependentAssembly>
23-
<assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
24-
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0"/>
23+
<assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral" />
24+
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
2525
</dependentAssembly>
2626
<dependentAssembly>
27-
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
28-
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0"/>
27+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
28+
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
2929
</dependentAssembly>
3030
<dependentAssembly>
31-
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
32-
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0"/>
31+
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
32+
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
3333
</dependentAssembly>
3434
</assemblyBinding>
3535
</runtime>

samples/NuGet.Server.V2.Samples.OwinHost/packages.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
1111
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net45" />
1212
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net45" />
13+
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net46" />
1314
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net461" />
15+
<package id="NuGet.Core" version="2.11.1" targetFramework="net46" />
1416
<package id="Owin" version="1.0" targetFramework="net45" />
1517
<package id="System.Spatial" version="5.7.0" targetFramework="net45" />
1618
</packages>

0 commit comments

Comments
 (0)