Permalink
Browse files

Merge remote branch 'dnauck/master'

Conflicts:
	Build.proj
  • Loading branch information...
2 parents 7c6434c + 80daa6b commit 9562d22359d562550e47044945ee83732e2b3f76 @jagregory committed Aug 23, 2010
View
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildRevision>0</BuildRevision>
<!-- BUILD_NUMBER is exposed as an environment variable in TeamCity -->
<BuildRevision Condition="'$(BUILD_NUMBER)' != ''">$(BUILD_NUMBER)</BuildRevision>
<!-- Manually update the 3 significant portions of the BuildVersion when appropriate -->
- <BuildVersion>0.1.0.$(BuildRevision)</BuildVersion>
+ <BuildVersion>$(BuildRevision)</BuildVersion>
<RunningOnBuildServer>false</RunningOnBuildServer>
<RunningOnBuildServer Condition="'$(TEAMCITY_PROJECT_NAME)' != ''">true</RunningOnBuildServer>
@@ -65,4 +65,4 @@
<Zip Files="@(FilesToZip)" WorkingDirectory="artifacts" ZipFileName="artifacts\published\docu_$(BuildVersion).zip" />
</Target>
-</Project>
+</Project>
@@ -44,12 +44,12 @@ private void DefineSwitches()
}));
switches.Add(new ParameterSwitch("--output", arg =>
{
- documentationGenerator.SetOutputPath(arg);
+ documentationGenerator.SetOutputPath(arg.TrimEnd('\\'));
return true;
}));
switches.Add(new ParameterSwitch("--templates", arg =>
{
- documentationGenerator.SetTemplatePath(arg);
+ documentationGenerator.SetTemplatePath(arg.TrimEnd('\\'));
return true;
}));
}
@@ -1,3 +1,4 @@
+using System;
using System.Collections.Generic;
using Docu.Parsing.Model;
@@ -14,6 +15,11 @@ public NamespaceGenerator(IDictionary<Identifier, IReferencable> matchedAssociat
public void Add(List<Namespace> namespaces, IDocumentationMember association)
{
+ if (association.TargetType.Namespace == null)
+ throw new NullReferenceException(
+ string.Format("There was no namespace found for {0}",
+ association.TargetType.AssemblyQualifiedName));
+
var ns = Identifier.FromNamespace(association.TargetType.Namespace);
if (!namespaces.Exists(x => x.IsIdentifiedBy(ns)))
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
+using Docu.Console;
namespace Docu.Parsing.Model
{
@@ -15,6 +16,7 @@ public abstract class Identifier : IComparable<Identifier>, IEquatable<Identifie
private static Dictionary<string, Type> nameToType;
private static char START_GENERIC_ARGUMENTS = '{';
private static char END_GENERIC_ARGUMENTS = '}';
+ private static IScreenWriter screenWriter = new ConsoleScreenWriter();
protected Identifier(string name)
{
@@ -247,9 +249,18 @@ private static void buildTypeLookup()
nameToType = new Dictionary<string, Type>();
foreach(var assembly in AppDomain.CurrentDomain.GetAssemblies())
{
- foreach(var type in assembly.GetTypes())
+ try
{
- nameToType[type.FullName] = type;
+ foreach (var type in assembly.GetTypes())
+ {
+ if (type.FullName != null)
+ nameToType[type.FullName] = type;
+ }
+ }
+ catch (ReflectionTypeLoadException ex)
+ {
+ screenWriter.WriteLine(string.Format("Could not load types of assembly '{0}'.{1}{2}",
+ assembly.FullName, Environment.NewLine, ex.InnerException));
}
}
}

0 comments on commit 9562d22

Please sign in to comment.