<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Analyzing events usage using a R# plugin</title>
	<atom:link href="http://www.japf.fr/2009/10/analyzing-events-usage-using-a-resharper-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.japf.fr/2009/10/analyzing-events-usage-using-a-resharper-plugin/</link>
	<description>Jeremy Alles Presentation Foundation: WPF, .Net and modern software development</description>
	<lastBuildDate>Sat, 24 Jul 2010 08:59:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Mike Strobel</title>
		<link>http://www.japf.fr/2009/10/analyzing-events-usage-using-a-resharper-plugin/comment-page-1/#comment-479</link>
		<dc:creator>Mike Strobel</dc:creator>
		<pubDate>Fri, 16 Oct 2009 16:21:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.japf.fr/?p=286#comment-479</guid>
		<description>Jeremy, I have not read the CodeProject article, but you can find my implementation here:
http://72.167.90.173/WeakEventHelper.zip

A reference to the DelegatingWeakEventListener needs to be stored somewhere (usually as a field in the actual listener object) to avoid it being garbage collected until the actual listener is collected.</description>
		<content:encoded><![CDATA[<p>Jeremy, I have not read the CodeProject article, but you can find my implementation here:<br />
<a href="http://72.167.90.173/WeakEventHelper.zip" rel="nofollow">http://72.167.90.173/WeakEventHelper.zip</a></p>
<p>A reference to the DelegatingWeakEventListener needs to be stored somewhere (usually as a field in the actual listener object) to avoid it being garbage collected until the actual listener is collected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy</title>
		<link>http://www.japf.fr/2009/10/analyzing-events-usage-using-a-resharper-plugin/comment-page-1/#comment-474</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Fri, 16 Oct 2009 08:00:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.japf.fr/?p=286#comment-474</guid>
		<description>Mike,

Do you have any pointer to your work about WeakEventManager ? Do you think it&#039;s better than the implementation available in the CodeProject article ?

And thank you for the feedback, I might contact you soon to discuss your ideas about the R# plugin :-)</description>
		<content:encoded><![CDATA[<p>Mike,</p>
<p>Do you have any pointer to your work about WeakEventManager ? Do you think it&#8217;s better than the implementation available in the CodeProject article ?</p>
<p>And thank you for the feedback, I might contact you soon to discuss your ideas about the R# plugin <img src='http://www.japf.fr/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Strobel</title>
		<link>http://www.japf.fr/2009/10/analyzing-events-usage-using-a-resharper-plugin/comment-page-1/#comment-469</link>
		<dc:creator>Mike Strobel</dc:creator>
		<pubDate>Thu, 15 Oct 2009 19:28:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.japf.fr/?p=286#comment-469</guid>
		<description>Here&#039;s an idea: provide a new annotation attribute along the lines of [UnloadMethod], which could indicate that a method is invoked to &quot;unload&quot; an object.  If your plugin sees that an event is unsubscribed via a call chain involving the unload method, it can assume that the event will always be unsubscribed whenever that object is used.  It should also understand the IDisposable pattern and assume that any event unsubscriptions stemming from Dispose() will always be performed.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s an idea: provide a new annotation attribute along the lines of [UnloadMethod], which could indicate that a method is invoked to &#8220;unload&#8221; an object.  If your plugin sees that an event is unsubscribed via a call chain involving the unload method, it can assume that the event will always be unsubscribed whenever that object is used.  It should also understand the IDisposable pattern and assume that any event unsubscriptions stemming from Dispose() will always be performed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Strobel</title>
		<link>http://www.japf.fr/2009/10/analyzing-events-usage-using-a-resharper-plugin/comment-page-1/#comment-468</link>
		<dc:creator>Mike Strobel</dc:creator>
		<pubDate>Thu, 15 Oct 2009 19:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.japf.fr/?p=286#comment-468</guid>
		<description>To answer your first question, I wrote a custom implementation of WeakEventManager that works on any event type, and pair it with a DelegatingWeakEvent class that implements IWeakEventListener and accepts a delegate as a constructor argument (which it invokes upon receiving the weak event).

Being a fellow ReSharper Jedi, I think this is a great idea for a plugin.  I generally like to see R# plugins released under some sort of open source license (permissive or reciprocal).  That way if you lose interest or become slow to update it when the R# APIs change, we can recompile it ourselves :).</description>
		<content:encoded><![CDATA[<p>To answer your first question, I wrote a custom implementation of WeakEventManager that works on any event type, and pair it with a DelegatingWeakEvent class that implements IWeakEventListener and accepts a delegate as a constructor argument (which it invokes upon receiving the weak event).</p>
<p>Being a fellow ReSharper Jedi, I think this is a great idea for a plugin.  I generally like to see R# plugins released under some sort of open source license (permissive or reciprocal).  That way if you lose interest or become slow to update it when the R# APIs change, we can recompile it ourselves <img src='http://www.japf.fr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
</channel>
</rss>
