AssemblyChecker.IsAllowed is used whenever we have to check all loaded assemblies for types.
Used in BinaryDataExtensions, a more complex example is in DeltaEngine.Platforms.All.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Tests.Extensions AssemblyCheckerTests
Namespace: DeltaEngine.Tests.Extensions
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The AssemblyCheckerTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
AssemblyCheckerTests | Initializes a new instance of the AssemblyCheckerTests class |
Methods
Name | Description | |
---|---|---|
MakeSureToOnlyIncludeAllowedDeltaEngineAndUserAssemblies |
Examples
[Test, Ignore] public void MakeSureToOnlyIncludeAllowedDeltaEngineAndUserAssemblies() { Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); var assembliesAllowed = new List<string>(); foreach (Assembly assembly in assemblies.Where(assembly => assembly.IsAllowed())) assembliesAllowed.Add(assembly.GetName().Name); // At this point only DeltaEngine.Tests, DeltaEngine, DeltaEngine.Mocks should be loaded Assert.AreEqual(3, assembliesAllowed.Count, "Assemblies: " + assembliesAllowed.ToText()); }
See Also