An event with a default delegate does not get regionerated

If you find any bugs, please post them here.

An event with a default delegate does not get regionerated

Postby rathkopf » Tue Nov 11, 2008 11:32 pm

The following is not recognized as an event:

Code: Select all

      public event EventHandler myevent = delegate { };

rathkopf
 
Posts: 22
Joined: Sun Jul 01, 2007 12:07 am

Re: An event with a default delegate does not get regionerated

Postby rauchy » Fri Mar 13, 2009 5:26 pm

rathkopf,

Can you open a ticket for this?

Thanks,
-- rauchy
-- rauchy.
rauchy
Site Admin
 
Posts: 268
Joined: Wed May 09, 2007 2:39 am
Location: Israel

Re: An event with a default delegate does not get regionerated

Postby cinderella_2010 » Wed Apr 14, 2010 10:05 am

hi, I encoutered this problem before, now I fixed it. The problem is about the regular expression of the Event type.
the orginal is like below:
(?<StringRepresentation>\A\s*(?:(?:(?<Comment>(?://.*\n)|(?:/\*(?:[\w\d!@#$%^&*()\[\]<>,.;\\"':|{}`~+=-_?\s]*)?\*/))|(\[\s*(?<Attributes>\w*)[^\[\]]*?\]))\s*)*?(?:(?:(?<Access>protected\s+internal|internal\s+protected|private|public|protected|internal)\s+)?(?:(?<InheritanceModifier>new|abstract|override|virtual)\s+)?(?:(?<Static>static)\s+)?)+event\s+(?<Type>\w+(?:[\w,.\?\[\]])*?(?:\<.*>)*?)\s+(?<Name>(?:\w\<*\>*\.*\d*)+?)\s*(?:(?:\{(?:\s*add\s*(?:(?:\{[^\{\}]*(?:(?:(?:(?<OpenS>\{)[^\{\}]*)+(?:(?<CloseS-OpenS>\})[^\{\}]*?)+)*(?(OpenS)(?!))\}))?|;)\s*remove\s*(?:(?:\{[^\{\}]*(?:(?:(?:(?<OpenS>\{)[^\{\}]*)+(?:(?<CloseS-OpenS>\})[^\{\}]*?)+)*(?(OpenS)(?!))\}))|;)?\s*){1,2}\})|;))

my version is :
(?<StringRepresentation>\A\s*(?:(?:(?<Comment>(?://.*\n)|(?:/\*(?:[\w\d!@#$%^&*()\[\]<>,.;\\"':|{}`~+=-_?\s]*)?\*/))|(\[\s*(?<Attributes>\w*)[^\[\]]*?\]))\s*)*?(?:(?:(?<Access>protected\s+internal|internal\s+protected|private|public|protected|internal)\s+)?(?:(?<InheritanceModifier>new|abstract|override|virtual)\s+)?(?:(?<Static>static)\s+)?)+event\s+(?<Type>\w+(?:[\w,.\?\[\]])*?(?:\<.*>)*?)\s+(?<Name>(?:\w\<*\>*\.*\d*)+?)\s*(\s*\=\s*delegate\s*\{\s*\})?(?:(?:\{(?:\s*add\s*(?:(?:\{[^\{\}]*(?:(?:(?:(?<OpenS>\{)[^\{\}]*)+(?:(?<CloseS-OpenS>\})[^\{\}]*?)+)*(?(OpenS)(?!))\}))?|;)\s*remove\s*(?:(?:\{[^\{\}]*(?:(?:(?:(?<OpenS>\{)[^\{\}]*)+(?:(?<CloseS-OpenS>\})[^\{\}]*?)+)*(?(OpenS)(?!))\}))|;)?\s*){1,2}\})|;))

now it works.
hope this is helpful
cinderella_2010
 
Posts: 3
Joined: Wed Apr 14, 2010 9:59 am


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron