<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://codegator.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Martin Cook - All Comments</title><link>http://codegator.com/mcook/default.aspx</link><description>Yet another C# developer with a blog.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><item><title>ManImFresh.Com</title><link>http://codegator.com/mcook/archive/2008/03/26/cg-storage-some-examples.aspx#315</link><pubDate>Sun, 09 Nov 2008 14:51:02 GMT</pubDate><guid isPermaLink="false">60ee2e05-c1d4-40f6-b847-9c08813e2f9a:315</guid><dc:creator>ManImFresh.Com</dc:creator><description>&lt;p&gt;I love this site its so cool. Im gonna tell my boyfriend about it.&lt;/p&gt;
&lt;img src="http://codegator.com/aggbug.aspx?PostID=315" width="1" height="1"&gt;</description></item><item><title>re: Extending WebClient using C#</title><link>http://codegator.com/mcook/archive/2006/07/17/extending-webclient-using-c.aspx#314</link><pubDate>Sun, 26 Oct 2008 11:18:47 GMT</pubDate><guid isPermaLink="false">60ee2e05-c1d4-40f6-b847-9c08813e2f9a:314</guid><dc:creator>Aviv Stern</dc:creator><description>&lt;p&gt;Thanks! this was superb!!&lt;/p&gt;
&lt;img src="http://codegator.com/aggbug.aspx?PostID=314" width="1" height="1"&gt;</description></item><item><title>re: Custom configuration settings in .NET 2.0</title><link>http://codegator.com/mcook/archive/2006/08/15/custom-configuration-settings-in-net-2-0.aspx#313</link><pubDate>Thu, 16 Oct 2008 21:14:15 GMT</pubDate><guid isPermaLink="false">60ee2e05-c1d4-40f6-b847-9c08813e2f9a:313</guid><dc:creator>Jay</dc:creator><description>&lt;p&gt;Thanks buddy!! nice article.. :X&lt;/p&gt;
&lt;img src="http://codegator.com/aggbug.aspx?PostID=313" width="1" height="1"&gt;</description></item><item><title>re: Extending WebClient using C#</title><link>http://codegator.com/mcook/archive/2006/07/17/extending-webclient-using-c.aspx#311</link><pubDate>Mon, 01 Sep 2008 09:51:36 GMT</pubDate><guid isPermaLink="false">60ee2e05-c1d4-40f6-b847-9c08813e2f9a:311</guid><dc:creator>parke</dc:creator><description>&lt;p&gt;thank youu&lt;/p&gt;
&lt;img src="http://codegator.com/aggbug.aspx?PostID=311" width="1" height="1"&gt;</description></item><item><title>re: Extracting thumbnails using the Windows shell.</title><link>http://codegator.com/mcook/archive/2007/06/10/extracting-thumbnails-using-the-windows-shell.aspx#310</link><pubDate>Mon, 18 Aug 2008 12:35:39 GMT</pubDate><guid isPermaLink="false">60ee2e05-c1d4-40f6-b847-9c08813e2f9a:310</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;Hello C,&lt;/p&gt;
&lt;p&gt;Sorry I haven't responded, I simply haven't had much time for CODEGATOR lately.&lt;/p&gt;
&lt;p&gt;The thumbnail code hasn't been tested under Vista. I believe some of the interfaces may not work the same in that OS. I don't have access to Vista so I haven't been able to verify that.&lt;/p&gt;
&lt;p&gt;The code should generate thumbnails for older Office docs, but then again it's really just deferring to Office, via the Windows shell, to actually generate those images, so if it doesn't work the problem may not be in my code (I know, I know, it sounds like an excuse on my part. I'm just thinking aloud). I have not tested this code with different versions of Office.&lt;/p&gt;
&lt;p&gt;If I get the time to rediscover my website I'll look into that problem and see what I can do. &lt;/p&gt;
&lt;p&gt;Thanks for reading CODEGATOR&lt;/p&gt;
&lt;img src="http://codegator.com/aggbug.aspx?PostID=310" width="1" height="1"&gt;</description></item><item><title>re: Extracting thumbnails using the Windows shell.</title><link>http://codegator.com/mcook/archive/2007/06/10/extracting-thumbnails-using-the-windows-shell.aspx#309</link><pubDate>Fri, 15 Aug 2008 22:27:59 GMT</pubDate><guid isPermaLink="false">60ee2e05-c1d4-40f6-b847-9c08813e2f9a:309</guid><dc:creator>c</dc:creator><description>&lt;p&gt;With reference to my above comment, the OS that I am running on is Vista&lt;/p&gt;
&lt;img src="http://codegator.com/aggbug.aspx?PostID=309" width="1" height="1"&gt;</description></item><item><title>re: Extracting thumbnails using the Windows shell.</title><link>http://codegator.com/mcook/archive/2007/06/10/extracting-thumbnails-using-the-windows-shell.aspx#308</link><pubDate>Fri, 15 Aug 2008 22:15:24 GMT</pubDate><guid isPermaLink="false">60ee2e05-c1d4-40f6-b847-9c08813e2f9a:308</guid><dc:creator>C</dc:creator><description>&lt;p&gt;Hi Martin, &lt;/p&gt;
&lt;p&gt;Great article! I have a question....will it generate thumbnails for older office documents? when I am tryign to generate thumbnails for older office documents, it is throwing &amp;quot;Specified cast is not valid&amp;quot; error. So I was just wondering if you tested with older versions.&lt;/p&gt;
&lt;p&gt;It is generating thumbnails fine for 2007 office documents but only for those documents which have been saved with &amp;quot;Save Thumbnail&amp;quot; option. Is that right? Or will it generate the thumbnails on-the-fly for those documents which have not been saved with thumbnail?&lt;/p&gt;
&lt;p&gt;Did you try on a windows server 2003 box?&lt;/p&gt;
&lt;p&gt;Thanks for all your clarifications!&lt;/p&gt;
&lt;img src="http://codegator.com/aggbug.aspx?PostID=308" width="1" height="1"&gt;</description></item><item><title>re: Extracting thumbnails using the Windows shell.</title><link>http://codegator.com/mcook/archive/2007/06/10/extracting-thumbnails-using-the-windows-shell.aspx#307</link><pubDate>Fri, 15 Aug 2008 22:11:48 GMT</pubDate><guid isPermaLink="false">60ee2e05-c1d4-40f6-b847-9c08813e2f9a:307</guid><dc:creator>c</dc:creator><description>&lt;p&gt;c&lt;/p&gt;
&lt;img src="http://codegator.com/aggbug.aspx?PostID=307" width="1" height="1"&gt;</description></item><item><title>re: An event broker solution - part 5</title><link>http://codegator.com/mcook/archive/2007/10/25/an-event-broker-solution-part-5.aspx#306</link><pubDate>Fri, 18 Jul 2008 17:05:54 GMT</pubDate><guid isPermaLink="false">60ee2e05-c1d4-40f6-b847-9c08813e2f9a:306</guid><dc:creator>Steve</dc:creator><description>&lt;p&gt;How are you invoking the registration of the Handlers (Subscribers).&lt;/p&gt;
&lt;p&gt;Since you are using the [EventSubscription(&amp;quot;someMethodSignature&amp;quot;)] attribute I assume they are automatically registered, but what is invoking your auto-registration method to start?&lt;/p&gt;
&lt;p&gt;You could use a static constructor in your EventBroker to initiate this, but are you searching all classes with static methods for your attributes to initialize their registration?&lt;/p&gt;
&lt;p&gt;I see the point of useing Attribute.Topic as a rough event signature, but this also means that you need to mark every event that is supported by the EventBroker. &amp;nbsp;Couldn't you also define it through the type and its event name. &amp;nbsp;IE&lt;/p&gt;
&lt;p&gt;public class DemoListener&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp;[EventSubscription&amp;lt;OtherType&amp;gt;(&amp;quot;SomeMethod&amp;quot;)] &lt;/p&gt;
&lt;p&gt; &amp;nbsp;public static OtherType_OnSomeMethod(object sender, EventArgs e)&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;...&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;public class OtherType&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; public event EventHandle SomeMethod;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; public void OnSomeMethod&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(SomeMethod != null)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SomeMethod(this, EventArgs.Empty);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;But again, what is registering the DemoListener.OtherType_OnSomeMethod as the listener if both OtherType and the EventBroker are loosly coupled.&lt;/p&gt;
&lt;p&gt;I had created an attribute that would auto invoke methods when the assembly loaded, but it required to be initialized by the application. &amp;nbsp;The EventSubscriptionAttribute is the better approach, but do you have to manually invoke the registration for their Registration.&lt;/p&gt;
&lt;p&gt;[AssemblyInit]&lt;/p&gt;
&lt;p&gt;public static void RunMe()&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;/// I did a manuall registation here for my EventListeners&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;img src="http://codegator.com/aggbug.aspx?PostID=306" width="1" height="1"&gt;</description></item><item><title>re: Embedding adsense units inside CS 2007 blog posts</title><link>http://codegator.com/mcook/archive/2007/07/12/embedding-adsense-units-inside-cs-2007-blog-posts.aspx#305</link><pubDate>Thu, 12 Jun 2008 12:32:41 GMT</pubDate><guid isPermaLink="false">60ee2e05-c1d4-40f6-b847-9c08813e2f9a:305</guid><dc:creator>Martin</dc:creator><description>&lt;p&gt;Hello lowster,&lt;/p&gt;
&lt;p&gt;You are most welcome. I'm glad to be of assistance. Thank you for reading my little blog.&lt;/p&gt;
&lt;img src="http://codegator.com/aggbug.aspx?PostID=305" width="1" height="1"&gt;</description></item></channel></rss>