Skip to content

Commit

Permalink
Merge branch 'hotfix-0.6.2' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	Source/Machine.Specifications.Specs/CatchSpecs.cs
	ripple.config
  • Loading branch information
danielmarbach committed Jan 7, 2014
2 parents 442947f + 318e2f3 commit dc9660b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ public void ExploreAssembly(IProject project, IMetadataAssembly assembly, UnitTe
{
using (ReadLockCookie.Create()) //Get a read lock so that it is safe to read the assembly
{
foreach (var metadataTypeInfo in GetExportedTypes(assembly.GetTypes()))
foreach (var metadataTypeInfo in GetTypesIncludingNested(assembly.GetTypes()))
this._assemblyExplorer.Explore(project, assembly, consumer, metadataTypeInfo);
}
}

private static IEnumerable<IMetadataTypeInfo> GetExportedTypes(IEnumerable<IMetadataTypeInfo> types)
private static IEnumerable<IMetadataTypeInfo> GetTypesIncludingNested(IEnumerable<IMetadataTypeInfo> types)
{
foreach (var type in (types ?? Enumerable.Empty<IMetadataTypeInfo>()).Where(IsPublic))
foreach (var type in (types ?? Enumerable.Empty<IMetadataTypeInfo>()))
{
foreach (var nestedType in GetExportedTypes(type.GetNestedTypes())) //getting nested classes too
foreach (var nestedType in GetTypesIncludingNested(type.GetNestedTypes())) //getting nested classes too
{
yield return nestedType;
}
Expand All @@ -43,11 +43,6 @@ private static IEnumerable<IMetadataTypeInfo> GetExportedTypes(IEnumerable<IMeta
}
}

private static bool IsPublic(IMetadataTypeInfo type)
{
return (type.IsNested && type.IsNestedPublic) || type.IsPublic;
}

public IUnitTestProvider Provider
{
get { return _provider; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ public void ExploreAssembly(IProject project, IMetadataAssembly assembly, UnitTe
{
using (ReadLockCookie.Create()) //Get a read lock so that it is safe to read the assembly
{
foreach (var metadataTypeInfo in GetExportedTypes(assembly.GetTypes()))
foreach (var metadataTypeInfo in GetTypesIncludingNested(assembly.GetTypes()))
this._assemblyExplorer.Explore(project, assembly, consumer, metadataTypeInfo);
}
}

private static IEnumerable<IMetadataTypeInfo> GetExportedTypes(IEnumerable<IMetadataTypeInfo> types)
private static IEnumerable<IMetadataTypeInfo> GetTypesIncludingNested(IEnumerable<IMetadataTypeInfo> types)
{
foreach (var type in (types ?? Enumerable.Empty<IMetadataTypeInfo>()).Where(IsPublic))
foreach (var type in (types ?? Enumerable.Empty<IMetadataTypeInfo>()))
{
foreach (var nestedType in GetExportedTypes(type.GetNestedTypes())) //getting nested classes too
foreach (var nestedType in GetTypesIncludingNested(type.GetNestedTypes())) //getting nested classes too
{
yield return nestedType;
}
Expand All @@ -49,11 +49,6 @@ private static IEnumerable<IMetadataTypeInfo> GetExportedTypes(IEnumerable<IMeta
}
}

private static bool IsPublic(IMetadataTypeInfo type)
{
return (type.IsNested && type.IsNestedPublic) || type.IsPublic;
}

public IUnitTestProvider Provider
{
get { return _provider; }
Expand Down

0 comments on commit dc9660b

Please sign in to comment.