Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
Remove reduntant using directives.
Browse files Browse the repository at this point in the history
  • Loading branch information
damianh committed Feb 19, 2015
1 parent 293ee2a commit 1e505bf
Show file tree
Hide file tree
Showing 459 changed files with 1,044 additions and 807 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
using System;
using FakeItEasy;
using Nancy.Tests;
using Xunit;

namespace Nancy.Authentication.Basic.Tests
namespace Nancy.Authentication.Basic.Tests
{
public class BasicAuthenticationConfigurationFixture
using System;

using FakeItEasy;

using Nancy.Tests;

using Xunit;

public class BasicAuthenticationConfigurationFixture
{
[Fact]
public void Should_throw_with_null_user_validator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
using System.Collections.Generic;
using System.Text;
using System.Threading;

using FakeItEasy;

using Nancy.Bootstrapper;
using Nancy.Security;
using Nancy.Tests;
using Xunit;
using Nancy.Bootstrapper;
using Nancy.Tests.Fakes;

using Xunit;

public class BasicAuthenticationFixture
{
private readonly BasicAuthenticationConfiguration config;
Expand Down
1 change: 1 addition & 0 deletions src/Nancy.Authentication.Basic/BasicAuthentication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
using System;
using System.Text;

using Nancy.Bootstrapper;
using Nancy.Extensions;
using Nancy.Security;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Nancy.Authentication.Basic
{
using System;

/// <summary>
/// Configuration options for forms authentication
/// </summary>
Expand All @@ -13,7 +13,7 @@ public class BasicAuthenticationConfiguration
/// <param name="userValidator">A valid instance of <see cref="IUserValidator"/> class</param>
/// <param name="realm">Basic authentication realm</param>
/// <param name="userPromptBehaviour">Control when the browser should be instructed to prompt for credentials</param>
public BasicAuthenticationConfiguration(IUserValidator userValidator, string realm, UserPromptBehaviour userPromptBehaviour = Basic.UserPromptBehaviour.NonAjax)
public BasicAuthenticationConfiguration(IUserValidator userValidator, string realm, UserPromptBehaviour userPromptBehaviour = UserPromptBehaviour.NonAjax)
{
if (userValidator == null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Nancy.Authentication.Basic/BasicHttpExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Nancy.Authentication.Basic
{
using Nancy.Bootstrapper;

/// <summary>
/// Some simple helpers give some nice authentication syntax in the modules.
/// </summary>
Expand Down
7 changes: 2 additions & 5 deletions src/Nancy.Authentication.Basic/IUserValidator.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Nancy.Authentication.Basic
namespace Nancy.Authentication.Basic
{
using Nancy.Security;

/// <summary>
/// <summary>
/// Provides a way to validate the username and password
/// </summary>
public interface IUserValidator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
namespace Nancy.Authentication.Forms.Tests.Fakes
{
using System.Collections.Generic;
using Security;

using Nancy.Security;

public class FakeUserIdentity : IUserIdentity
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Nancy.Authentication.Forms.Tests

using Nancy.Cryptography;
using Nancy.Tests;

using Xunit;

public class FormsAuthenticationConfigurationFixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ namespace Nancy.Authentication.Forms.Tests
using System;
using System.Linq;
using System.Threading;
using Bootstrapper;
using Cryptography;

using FakeItEasy;
using Fakes;
using Helpers;
using Nancy.Security;

using Nancy.Authentication.Forms.Tests.Fakes;
using Nancy.Bootstrapper;
using Nancy.Cryptography;
using Nancy.Helpers;
using Nancy.Tests;
using Nancy.Tests.Fakes;

using Xunit;

public class FormsAuthenticationFixture
Expand Down
11 changes: 6 additions & 5 deletions src/Nancy.Authentication.Forms/FormsAuthentication.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
namespace Nancy.Authentication.Forms
{
using System;
using Bootstrapper;
using Cookies;
using Cryptography;
using Helpers;

using Nancy.Bootstrapper;
using Nancy.Cookies;
using Nancy.Cryptography;
using Nancy.Extensions;
using Nancy.Helpers;
using Nancy.Security;

/// <summary>
Expand Down Expand Up @@ -355,7 +356,7 @@ private static byte[] GenerateHmac(string encryptedCookie, FormsAuthenticationCo
public static string DecryptAndValidateAuthenticationCookie(string cookieValue, FormsAuthenticationConfiguration configuration)
{
// TODO - shouldn't this be automatically decoded by nancy cookie when that change is made?
var decodedCookie = Helpers.HttpUtility.UrlDecode(cookieValue);
var decodedCookie = HttpUtility.UrlDecode(cookieValue);

var hmacStringLength = Base64Helpers.GetBase64Length(configuration.CryptographyConfiguration.HmacProvider.HmacLength);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Nancy.Authentication.Forms
{
using Cryptography;
using Nancy.Cryptography;

/// <summary>
/// Configuration options for forms authentication
Expand Down
1 change: 1 addition & 0 deletions src/Nancy.Authentication.Forms/IUserMapper.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Nancy.Authentication.Forms
{
using System;

using Nancy.Security;

/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion src/Nancy.Authentication.Forms/ModuleExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
namespace Nancy.Authentication.Forms
{
using System;
using Extensions;

using Nancy.Extensions;

/// <summary>
/// Module extensions for login/logout of forms auth
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Nancy.Authentication.Stateless
{
using System;

using Nancy.Bootstrapper;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Nancy.Authentication.Stateless
{
using System;

using Nancy.Security;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
using System.IO;
using System.Linq;
using System.Text;

using Nancy.Authentication.Token.Storage;
using Nancy.Testing.Fakes;

using Xunit;

public class FileSystemTokenKeyStoreFixture
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
namespace Nancy.Authentication.Token.Tests
{
using System;

using Nancy.Tests;

using Xunit;

public class TokenAuthenticationConfigurationFixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
using System;
using System.Collections.Generic;
using System.Threading;

using FakeItEasy;

using Nancy.Bootstrapper;
using Nancy.Security;
using Nancy.Tests;
using Nancy.Bootstrapper;
using Nancy.Tests.Fakes;

using Xunit;

public class TokenAuthenticationFixture
Expand Down
5 changes: 4 additions & 1 deletion src/Nancy.Authentication.Token.Tests/TokenizerFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
using System.Collections.Generic;
using System.Text;
using System.Threading;

using FakeItEasy;

using Nancy.Authentication.Token.Storage;
using Nancy.Security;
using Nancy.Tests;
using Nancy.Tests.Fakes;
using FakeItEasy;

using Xunit;

public class TokenizerFixture
Expand Down
2 changes: 1 addition & 1 deletion src/Nancy.Authentication.Token/ITokenizer.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Nancy.Authentication.Token
{
using Security;
using Nancy.Security;

/// <summary>
/// Encodes and decodes authorization tokens.
Expand Down
1 change: 1 addition & 0 deletions src/Nancy.Authentication.Token/TokenAuthentication.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Nancy.Authentication.Token
{
using System;

using Nancy.Bootstrapper;
using Nancy.Security;

Expand Down
2 changes: 1 addition & 1 deletion src/Nancy.Authentication.Token/Tokenizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
using System.Text;

using Nancy.Authentication.Token.Storage;
using Nancy.Security;
using Nancy.ErrorHandling;
using Nancy.Security;

/// <summary>
/// Default implementation of <see cref="ITokenizer"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Nancy.Demo.Authentication.Basic
{
using Nancy.Authentication.Basic;
using Bootstrapper;
using Nancy.Bootstrapper;
using Nancy.TinyIoc;

public class AuthenticationBootstrapper : DefaultNancyBootstrapper
Expand Down
1 change: 1 addition & 0 deletions src/Nancy.Demo.Authentication.Basic/DemoUserIdentity.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Nancy.Demo.Authentication.Basic
{
using System.Collections.Generic;

using Nancy.Security;

public class DemoUserIdentity : IUserIdentity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
namespace Nancy.Demo.Authentication.Forms.TestingDemo
{
using System;
using Testing;

using Nancy.Testing;

using Xunit;

public class LoginFixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ namespace Nancy.Demo.Authentication.Forms.TestingDemo
{
using System;
using System.IO;

using Nancy.Testing;
using Nancy.Testing.Fakes;
using Testing;

public class TestBootstrapper : FormsAuthBootstrapper
{
Expand Down
1 change: 1 addition & 0 deletions src/Nancy.Demo.Authentication.Forms/DemoUserIdentity.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Nancy.Demo.Authentication.Forms
{
using System.Collections.Generic;

using Nancy.Security;

public class DemoUserIdentity : IUserIdentity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace Nancy.Demo.Authentication.Forms
{
using Nancy;
using Nancy.Authentication.Forms;
using Nancy.Bootstrapper;
using Nancy.TinyIoc;
Expand Down
2 changes: 1 addition & 1 deletion src/Nancy.Demo.Authentication.Forms/MainModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Nancy.Demo.Authentication.Forms
{
using System;
using System.Dynamic;
using Nancy;

using Nancy.Authentication.Forms;
using Nancy.Extensions;

Expand Down
1 change: 0 additions & 1 deletion src/Nancy.Demo.Authentication.Forms/PartlySecureModule.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace Nancy.Demo.Authentication.Forms
{
using Nancy;
using Nancy.Demo.Authentication.Forms.Models;
using Nancy.Security;

Expand Down
1 change: 0 additions & 1 deletion src/Nancy.Demo.Authentication.Forms/SecureModule.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace Nancy.Demo.Authentication.Forms
{
using Nancy;
using Nancy.Demo.Authentication.Forms.Models;
using Nancy.Security;

Expand Down
1 change: 1 addition & 0 deletions src/Nancy.Demo.Authentication.Forms/UserDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namespace Nancy.Demo.Authentication.Forms
using System;
using System.Collections.Generic;
using System.Linq;

using Nancy.Authentication.Forms;
using Nancy.Security;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace Nancy.Demo.Authentication.Stateless
{
using System.Collections.Generic;

using Nancy.Security;

public class DemoUserIdentity : IUserIdentity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ namespace Nancy.Demo.Authentication.Stateless
{
using Nancy.Authentication.Stateless;
using Nancy.Bootstrapper;
using Nancy.Conventions;
using Nancy.TinyIoc;

public class StatelessAuthBootstrapper : DefaultNancyBootstrapper
Expand Down
3 changes: 2 additions & 1 deletion src/Nancy.Demo.Authentication.Stateless/UserDatabase.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
namespace Nancy.Demo.Authentication.Stateless
{
using Nancy.Security;
using System;
using System.Collections.Generic;
using System.Linq;

using Nancy.Security;

public class UserDatabase
{
static readonly List<Tuple<string, string>> ActiveApiKeys = new List<Tuple<string, string>>();
Expand Down
Loading

0 comments on commit 1e505bf

Please sign in to comment.