Changeset 267
- Timestamp:
- 09/02/08 16:31:51 (3 months ago)
- Files:
-
- trunk/Source/Specifications/Machine.Specifications/Explorers/AssemblyExplorer.cs (modified) (1 diff)
- trunk/Source/Specifications/Machine.Specifications/IAssemblyContext.cs (added)
- trunk/Source/Specifications/Machine.Specifications/Machine.Specifications.csproj (modified) (1 diff)
- trunk/Source/Specifications/Machine.Specifications/Runner/SpecificationRunner.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/Specifications/Machine.Specifications/Explorers/AssemblyExplorer.cs
r157 r267 30 30 .Where(x=>x.Namespace == targetNamespace) 31 31 .Select(x=>CreateContextFrom(x)); 32 } 33 34 public IEnumerable<IAssemblyContext> FindAssemblyContextsIn(Assembly assembly) 35 { 36 return assembly.GetExportedTypes() 37 .Where(x => 38 x.GetInterfaces().Contains(typeof (IAssemblyContext))) 39 .Select(x => (IAssemblyContext)Activator.CreateInstance(x)); 32 40 } 33 41 trunk/Source/Specifications/Machine.Specifications/Machine.Specifications.csproj
r260 r267 56 56 <Compile Include="Factories\SpecificationFactory.cs" /> 57 57 <Compile Include="Factories\ContextFactory.cs" /> 58 <Compile Include="IAssemblyContext.cs" /> 58 59 <Compile Include="Model\Concern.cs" /> 59 60 <Compile Include="Model\ItSpecification.cs" /> trunk/Source/Specifications/Machine.Specifications/Runner/SpecificationRunner.cs
r260 r267 25 25 var contexts = _explorer.FindContextsIn(assembly); 26 26 27 var assemblyContexts = new List<IAssemblyContext>(_explorer.FindAssemblyContextsIn(assembly)); 28 29 assemblyContexts.ForEach(assemblyContext=> 30 assemblyContext.OnAssemblyStart()); 31 27 32 _listener.OnAssemblyStart(assembly); 33 28 34 RunContexts(contexts); 35 36 assemblyContexts.ForEach(assemblyContext=> 37 assemblyContext.OnAssemblyComplete()); 38 29 39 _listener.OnAssemblyEnd(assembly); 30 40 }