I think providing a Contains() method is the best way to handle that. 
Perhaps porting the Manifest definition to support ICollection might
be a good idea too, since that's fundamentally what it does (maybe it
already does?).

I'll add this as a feature request.

Jonathan

On 2/8/06, Brian Delahunty <[EMAIL PROTECTED]> wrote:
> I just noticed that if you attempt to add a Module to the Manifest of an
> application more than once the following exception is thrown:
> "System.InvalidOperationException: A file dependency with the same name
> already exists".
>
> Would it not be better to not throw an exception as it is not an exceptional
> circumstance. For example, I'm writing a grid application that is extensible
> (people can write plugins for the code that runs on the grid threads) - in
> order to ensure that I have all the necessary module dependencies I use
> reflection to find out which dependencies to add to the Manifest. Sometimes
> multiple plugins will have the same file so my code tries to add the
> dependency again - which results in the exception.
>
> I know I could keep track of which modules have already been added but since
> that information is already in memory it makes it kinda superfluous. Even if
> there was a "Contains()" method on the manifest it would be handy.
>
> Brian
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Alchemi-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/alchemi-developers
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Alchemi-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alchemi-developers

Reply via email to