Re: [Banshee-List] [banshee] [SourceManager] Handle exceptions in SourceAdded (bgo#612407)
- From: Alexander Kojevnikov <alexander kojevnikov com>
- To: banshee-list gnome org
- Subject: Re: [Banshee-List] [banshee] [SourceManager] Handle exceptions in SourceAdded (bgo#612407)
- Date: Fri, 26 Mar 2010 11:15:19 +1100
On 26 March 2010 03:42, Gabriel Burt <gabriel burt gmail com> wrote:
> On Wed, Mar 24, 2010 at 7:57 PM, Alexander Kojevnikov
> <alexk src gnome org> wrote:
>> + public static class EventExtensions
>> + {
>> + public static void SafeInvoke<T> (this T @event, params object[] args) where T : class
>> + {
>> + var multicast = @event as MulticastDelegate;
>
> Hey Alexander, looking at this, I wonder if it'd work [better] to have
> T : MulticastDelegate - then you wouldn't even have to cast.
Unfortunately we cannot specify internal types (such as Enum, Array,
Delegate and ValueType) as constraints on generic types:
http://stackoverflow.com/questions/191940/c-generics-wont-allow-delegate-type-constraints
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]