AssemblyCheckerTests ClassDelta Engine Documentation
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

System Object
  DeltaEngine.Tests.Extensions AssemblyCheckerTests

Namespace: DeltaEngine.Tests.Extensions
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class AssemblyCheckerTests

The AssemblyCheckerTests type exposes the following members.

Constructors

  NameDescription
Public methodAssemblyCheckerTests
Initializes a new instance of the AssemblyCheckerTests class
Top
Methods

  NameDescription
Public methodMakeSureToOnlyIncludeAllowedDeltaEngineAndUserAssemblies
Top
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