Machine.Specifications.Explorers.AssemblyExplorer.FindContextsIn C# (CSharp) Method

FindContextsIn() public method

public FindContextsIn ( Assembly assembly ) : IEnumerable
assembly System.Reflection.Assembly
return IEnumerable
        public IEnumerable<Context> FindContextsIn(Assembly assembly)
        {
            return EnumerateContextsIn(assembly).Select(CreateContextFrom);
        }

Same methods

AssemblyExplorer::FindContextsIn ( Assembly assembly, string targetNamespace ) : IEnumerable

Usage Example

        public IEnumerable<MSpecTestCase> DiscoverTests(string assemblyPath)
        {
            AssemblyExplorer assemblyExplorer = new AssemblyExplorer();

            Assembly assembly = Assembly.LoadFile(assemblyPath);
            IEnumerable<Context> contexts = assemblyExplorer.FindContextsIn(assembly);

            return contexts.SelectMany(context => CreateTestCase(context, assemblyPath)).ToList();
        }
All Usage Examples Of Machine.Specifications.Explorers.AssemblyExplorer::FindContextsIn