I get a weird error on the tear down of a test (something to do with a
handle destroyed). There's something in the ApplicationContext class
that causes it pain and suffering. I know ShellContext is only in the
sample app, but what do you think of this:
* add a field called _applicationContext of type ApplicationContext in
ShellContext
* create a method called AssociateWith(ApplicationContext
applicationContext) to set it
* make ShellContext implement IDisposable and dispose of the
ApplicationContext member
* make the following changes in Program.cs:
ApplicationContext context = new ApplicationContext();
shellContext.AssociateWith(context);
Application.Run(applicationContext);
This would make ShellContext testable so you could construct it
without an application context (since it's really only needed for the
call to Application.Run()) and doesn't need inherit the class.
David Laribee
unread,
Apr 30, 2008, 10:18:48 AM4/30/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to xe...@googlegroups.com
Will look at this tonight. Maybe it'd be good to create an ApplicationController abstraction.