Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Commit

Permalink
- Removed the IgnoreTypeLoadExceptions property from SecurityDoctor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristoffer Ahl committed Apr 17, 2013
1 parent 9337724 commit 110ed95
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Expand Up @@ -23,12 +23,6 @@ public void Should_not_have_event_listeners_registered()
Assert.That(SecurityDoctor.Listeners, Is.Null);
}

[Test]
public void Should_ignore_TypeLoadExceptions()
{
Assert.That(SecurityDoctor.IgnoreTypeLoadExceptions, Is.True);
}

[Test]
public void Should_register_event_listener()
{
Expand Down
4 changes: 1 addition & 3 deletions FluentSecurity/Diagnostics/SecurityDoctor.cs
Expand Up @@ -16,7 +16,7 @@ public static void ScanForEventListeners()
{
var assemblyScanner = new AssemblyScanner();
assemblyScanner.AssembliesFromApplicationBaseDirectory();
assemblyScanner.With(new SecurityEventListenerScanner(IgnoreTypeLoadExceptions));
assemblyScanner.With<SecurityEventListenerScanner>();
var eventListeners = assemblyScanner.Scan();

foreach (var eventListenerType in eventListeners)
Expand All @@ -26,7 +26,6 @@ public static void ScanForEventListeners()
}
}

public static bool IgnoreTypeLoadExceptions { get; set; }
internal static IList<ISecurityEventListener> Listeners { get; private set; }

public static void Register(Action<ISecurityEvent> eventListener)
Expand All @@ -42,7 +41,6 @@ public static void Register(ISecurityEventListener eventListener)

public static void Reset()
{
IgnoreTypeLoadExceptions = true;
Listeners = null;
}
}
Expand Down

0 comments on commit 110ed95

Please sign in to comment.