private BuildBaseline BuildBaselineFromAssembly(Assembly assembly) { var result = new BuildBaseline(); result.AssemblyFullName = assembly.FullName; result.AssemblyFileName = assembly.ManifestModule.Name; result.DefinitionTypeFullNames = ReflectionUtils.GetTypesFromAssembly <DefinitionBase>(assembly) .Where(t => !t.IsAbstract) .Select(t => t.AssemblyQualifiedName) .ToList(); result.ModelHandlerTypeFullNames = ReflectionUtils.GetTypesFromAssembly <ModelHandlerBase>(assembly) .Where(t => !t.IsAbstract) .Select(t => t.AssemblyQualifiedName) .ToList(); RegressionUtils.WriteLine(string.Format("AssemblyFullName:[{0}]", result.AssemblyFullName)); RegressionUtils.WriteLine(string.Format("DefinitionTypeFullNames:[{0}]", result.DefinitionTypeFullNames.Count)); RegressionUtils.WriteLine(string.Format("ModelHandlerTypeFullNames:[{0}]", result.ModelHandlerTypeFullNames.Count)); RegressionUtils.WriteLine("Definitions:"); foreach (var name in result.DefinitionTypeFullNames) { RegressionUtils.WriteLine(" " + name); } RegressionUtils.WriteLine("Model handlers:"); foreach (var name in result.ModelHandlerTypeFullNames) { RegressionUtils.WriteLine(" " + name); } RegressionUtils.WriteLine(string.Empty); RegressionUtils.WriteLine(string.Empty); return(result); }
private BuildBaseline BuildBaselineFromAssembly(Assembly assembly) { var result = new BuildBaseline(); result.AssemblyFullName = assembly.FullName; result.AssemblyFileName = assembly.ManifestModule.Name; result.DefinitionTypeFullNames = ReflectionUtils.GetTypesFromAssembly<DefinitionBase>(assembly) .Where(t => !t.IsAbstract) .Select(t => t.AssemblyQualifiedName) .ToList(); result.ModelHandlerTypeFullNames = ReflectionUtils.GetTypesFromAssembly<ModelHandlerBase>(assembly) .Where(t => !t.IsAbstract) .Select(t => t.AssemblyQualifiedName) .ToList(); Trace.WriteLine(string.Format("AssemblyFullName:[{0}]", result.AssemblyFullName)); Trace.WriteLine(string.Format("DefinitionTypeFullNames:[{0}]", result.DefinitionTypeFullNames.Count)); Trace.WriteLine(string.Format("ModelHandlerTypeFullNames:[{0}]", result.ModelHandlerTypeFullNames.Count)); Trace.WriteLine("Definitions:"); foreach (var name in result.DefinitionTypeFullNames) Trace.WriteLine(" " + name); Trace.WriteLine("Model handlers:"); foreach (var name in result.ModelHandlerTypeFullNames) Trace.WriteLine(" " + name); Trace.WriteLine(string.Empty); Trace.WriteLine(string.Empty); return result; }