Namespace: DeltaEngine.ExtensionsAssembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
public static bool IsManagedAssembly(
string fileName
)
public static bool IsManagedAssembly(
string fileName
)
Public Shared Function IsManagedAssembly (
fileName As String
) As Boolean
Public Shared Function IsManagedAssembly (
fileName As String
) As Boolean
public:
static bool IsManagedAssembly(
String^ fileName
)
public:
static bool IsManagedAssembly(
String^ fileName
)
static member IsManagedAssembly :
fileName : string -> bool
static member IsManagedAssembly :
fileName : string -> bool
Return Value
Type:
BooleanTests:
DeltaEngine.Tests.Extensions.AssemblyExtensionsTests2 unit tests call DeltaEngine.Extensions.AssemblyExtensions.IsManagedAssembly(System.String)
[Test]
public void CheckIfManagedAssembly()
{
string managedAssemblyFile = Path.Combine(Directory.GetCurrentDirectory(), "DeltaEngine.dll");
Assert.IsTrue(AssemblyExtensions.IsManagedAssembly(managedAssemblyFile));
}
[Test]
public void CheckIfManagedAssembly()
{
string managedAssemblyFile = Path.Combine(Directory.GetCurrentDirectory(), "DeltaEngine.dll");
Assert.IsTrue(AssemblyExtensions.IsManagedAssembly(managedAssemblyFile));
}
[Test]
public void CheckIfNotManagedAssembly()
{
string unmanagedAssemblyFile =
Path.Combine(Environment.ExpandEnvironmentVariables("%WinDir%"), "System32", "user32.dll");
Assert.IsFalse(AssemblyExtensions.IsManagedAssembly(unmanagedAssemblyFile));
}
[Test]
public void CheckIfNotManagedAssembly()
{
string unmanagedAssemblyFile =
Path.Combine(Environment.ExpandEnvironmentVariables("%WinDir%"), "System32", "user32.dll");
Assert.IsFalse(AssemblyExtensions.IsManagedAssembly(unmanagedAssemblyFile));
}