class View : Castle.MonoRail.Views.AspView.ViewAtDesignTime {
// project specific stuff like e.g.
protected RootAreaNode Root {
get { throw new NotImplementedException(this.ToString()); }
}
}
The "real" view base class would have went into some other namespace like
namespace WebApp {
abstract class View : Castle.MonoRail.Views.AspView.AspViewBase {
// project specific stuff like e.g.
protected RootAreaNode Root {
get { return (RootAreaNode) Properties["Site"]; }
}
}
}
I could then refer to the design to view by <%@Page .. inherits="View"%>
(without namespace) and AspView would map the global::View to
WebApp.View for the runtime view during compilation. See, I'm awfully
lazy :-)
>
> btw, when using R#, you don't need to have the Inherits="" class to be
> a Page, thus you can simply use your real View base class, and get
> intellisense, and actually a better one, as the membrs of Page would
> not appear there.
That *is* great news :-) I did not realize R# would work with a class
not based on Page. Thanks for the hint! I think I'll stick to this
solution, works fine for me. Not only does it reduce the amount of code,
it also bypasses the problem mentioned here:
http://support.castleproject.org/browse/CONTRIB-127
Regards,
Andre
I'll see what I can do.
BTW: I dropped a blog post regarding your hint
http://blog.andreloker.de/post/2008/05/MonoRail-AspView-and-ReSharper-skip-ViewAtDesignTime.aspx
Let me know if I'm missing anything.
Regards,
Andre