jacob
---------- Forwarded message ----------
From: s...@castleproject.org
Date: Mar 21, 4:36 pm
Subject: : /codegenerator/trunk/Castle.Tools.CodeGenerator/Services/
To: Castle Project Commits
User: chriso
Date: 2007/03/21 09:36 PM
Modified:
/codegenerator/trunk/Castle.Tools.CodeGenerator/Services/
ControllerVisitor.cs
Log:
Added some logging to tell why a controller might not have any code
generated for it.
File Changes:
Directory: /codegenerator/trunk/Castle.Tools.CodeGenerator/Services/
====================================================================
File [modified]: ControllerVisitor.cs
Delta lines: +18 -1
===================================================================
--- codegenerator/trunk/Castle.Tools.CodeGenerator/Services/ControllerVisitor.cs
2007-03-18 16:28:33 UTC (rev 133)
+++ codegenerator/trunk/Castle.Tools.CodeGenerator/Services/ControllerVisitor.cs
2007-03-22 00:35:57 UTC (rev 134)
@@ -92,8 +92,25 @@
#region Protected Methods
protected virtual bool IsController(TypeDeclaration typeDeclaration)
{
- return
+ bool isController =
typeDeclaration.Name.EndsWith("Controller") &&
(typeDeclaration.Modifier & Modifier.Partial) == Modifier.Partial;
+
+ if(!isController)
+ {
+ if( (typeDeclaration.Modifier & Modifier.Partial) !=
Modifier.Partial)
+ {
+ _logger.LogInfo("Controller Source for " +
typeDeclaration.Name +
+ " will not be included in the
generated sitemap because it is not a partial type");
+ }
+ if( !typeDeclaration.Name.EndsWith("Controller"))
+ {
+ _logger.LogInfo("Controller source for " +
typeDeclaration.Name +
+ " will not be included in the
generated site map because its type name does not end with
controller");
+
+ }
+ }
+
+ return isController;
}
protected virtual string GetArea(TypeDeclaration typeDeclaration)