From ca32af61a7025d78bd63fb64e62e7b2412b09cca Mon Sep 17 00:00:00 2001 From: Brennan Date: Wed, 4 Mar 2015 17:44:23 -0800 Subject: [PATCH] Removing Null* using Testing Null* classes --- .../Logging/NullDisposable.cs | 17 ------------ .../Logging/NullLogger.cs | 27 ------------------- .../Logging/NullLoggerFactory.cs | 23 ---------------- 3 files changed, 67 deletions(-) delete mode 100644 test/Microsoft.AspNet.Routing.Tests/Logging/NullDisposable.cs delete mode 100644 test/Microsoft.AspNet.Routing.Tests/Logging/NullLogger.cs delete mode 100644 test/Microsoft.AspNet.Routing.Tests/Logging/NullLoggerFactory.cs diff --git a/test/Microsoft.AspNet.Routing.Tests/Logging/NullDisposable.cs b/test/Microsoft.AspNet.Routing.Tests/Logging/NullDisposable.cs deleted file mode 100644 index ad687d1dbe..0000000000 --- a/test/Microsoft.AspNet.Routing.Tests/Logging/NullDisposable.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; - -namespace Microsoft.AspNet.Routing -{ - public class NullDisposable : IDisposable - { - public static NullDisposable Instance = new NullDisposable(); - - public void Dispose() - { - // intentionally does nothing - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNet.Routing.Tests/Logging/NullLogger.cs b/test/Microsoft.AspNet.Routing.Tests/Logging/NullLogger.cs deleted file mode 100644 index 59b3867fd3..0000000000 --- a/test/Microsoft.AspNet.Routing.Tests/Logging/NullLogger.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.Framework.Logging; - -namespace Microsoft.AspNet.Routing -{ - public class NullLogger : ILogger - { - public static NullLogger Instance = new NullLogger(); - - public IDisposable BeginScope(object state) - { - return NullDisposable.Instance; - } - - public void Log(LogLevel logLevel, int eventId, object state, Exception exception, Func formatter) - { - } - - public bool IsEnabled(LogLevel logLevel) - { - return false; - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNet.Routing.Tests/Logging/NullLoggerFactory.cs b/test/Microsoft.AspNet.Routing.Tests/Logging/NullLoggerFactory.cs deleted file mode 100644 index bf65ab225d..0000000000 --- a/test/Microsoft.AspNet.Routing.Tests/Logging/NullLoggerFactory.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.Framework.Logging; - -namespace Microsoft.AspNet.Routing -{ - public class NullLoggerFactory : ILoggerFactory - { - public LogLevel MinimumLevel { get; set; } - - public static NullLoggerFactory Instance = new NullLoggerFactory(); - - public ILogger CreateLogger(string name) - { - return NullLogger.Instance; - } - - public void AddProvider(ILoggerProvider provider) - { - } - } -} \ No newline at end of file