<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>All Things IT Blog &#187; C# Assembly</title>
	<atom:link href="http://www.enusbaum.com/blog/tag/c-assembly/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.enusbaum.com/blog</link>
	<description>My little nerded out corner of the Internets!</description>
	<lastBuildDate>Tue, 18 Oct 2011 20:22:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Discogs.com API Assembly for .NET Applications v1.0 Build 2871</title>
		<link>http://www.enusbaum.com/blog/2007/11/discogscom-api-assembly-for-net-applications-v10-build-2871/</link>
		<comments>http://www.enusbaum.com/blog/2007/11/discogscom-api-assembly-for-net-applications-v10-build-2871/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 01:20:48 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[C# Programming]]></category>
		<category><![CDATA[Discogs API]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[General Software]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# Assembly]]></category>
		<category><![CDATA[C# Example]]></category>
		<category><![CDATA[Cover Art]]></category>
		<category><![CDATA[Discogs]]></category>
		<category><![CDATA[Discogs.com]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.enusbaum.com/blog/2007/11/12/discogscom-api-assembly-for-net-applications-v10-build-2871/</guid>
		<description><![CDATA[Greetings Everyone! I&#8217;ve been working on the Discogs.com API Assembly for .NET Applications now for a couple days and have been able to make some progress. It&#8217;s now a bit more stable as well a a tiny bit easier to use. I took some time and added a DEBUG class. This class allows you to [...]]]></description>
			<content:encoded><![CDATA[<p>Greetings Everyone!</p>
<p>I&#8217;ve been working on the Discogs.com API Assembly for  .NET Applications now for a couple days and have been able to make some progress. It&#8217;s now a bit more stable as well a a tiny bit easier to use.</p>
<p>I took some time and added a DEBUG class. This class allows you to find out what&#8217;s happening within the Discogs.com Assembly if you start to have issues! <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This new class has two properties:</p>
<ul>
<li><strong>Verbose (bool)</strong> &#8211; If set to TRUE, Verbose logging will be enabled allowing you to get more precise detail on what is going on within the Assembly. Otherwise, only exceptions will be logged.</li>
<li><strong>Log (string)</strong> &#8211; This is a string containing the current debug log.</li>
</ul>
<p>Also, it has one Method:</p>
<ul>
<li><strong>LogEvent (string sEvent)</strong> &#8211; Logs the value passed in to the debug log. This way you can use the same debug log from your own applications <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Should help make things a little easier.</li>
</ul>
<p>New in this version as well is better error handling in the event of 404&#8242;s or an Artist/Release isn&#8217;t found. Before if you requested something that didn&#8217;t exist, the Assembly kinda crapped out while trying to deserialize the (non-existent) XML <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This has all been fixed.</p>
<p>I&#8217;m also including a small example program (with source code) on how to use the Discogs.com API Assembly. I&#8217;ve coded the example in C#, so sorry to all those VB.NET developers out there! <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  If one of you guys would like to translate it to VB.NET, I&#8217;d be more than happy to post it here as well.</p>
<p>If you do not already have Microsoft Visual Studio installed, no worries! Microsoft provides a free version for C# development called Visual C# Express and you can get it <a href="http://msdn2.microsoft.com/en-us/express/aa700756.aspx" title="Download Microsoft Visual C# Express" target="_blank">here</a> over at Microsoft.com. <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You will need to update the Reference to the Discogs.com API Assembly. It currently points to where I had it setup on my local machine. <img src='http://www.enusbaum.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Any and all feedback is appreciated!</p>
<p>Cheers!</p>
<p><strong>Discogs.com API Assembly for .NET Applications v1.0 Build 2871</strong> &#8211; <a href="http://www.enusbaum.com/Discogs/DiscogsAPI_10b2871.zip" title="Download Discogs.com API Assembly for .NET Applications!" target="_blank">Download</a> (9k)</p>
<p><strong>Discogs.com API Assembly Example Application (with Source)</strong> &#8211; <a href="http://www.enusbaum.com/Discogs/DiscogsAPI_Example.zip" title="Download Discogs.com API Assembly Example Application" target="_blank">Download</a> (10k)</p>
<div class="su-linkbox" id="post-62-linkbox"><div class="su-linkbox-label">Link to this post!</div><div class="su-linkbox-field"><input type="text" value="&lt;a href=&quot;http://www.enusbaum.com/blog/2007/11/discogscom-api-assembly-for-net-applications-v10-build-2871/&quot;&gt;Discogs.com API Assembly for .NET Applications v1.0 Build 2871&lt;/a&gt;" onclick="javascript:this.select()" readonly="readonly" style="width: 100%;" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.enusbaum.com/blog/2007/11/discogscom-api-assembly-for-net-applications-v10-build-2871/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Embedded Resources in C#</title>
		<link>http://www.enusbaum.com/blog/2007/01/embedded-resources-in-c/</link>
		<comments>http://www.enusbaum.com/blog/2007/01/embedded-resources-in-c/#comments</comments>
		<pubDate>Fri, 19 Jan 2007 18:50:39 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[C# Programming]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# Assembly]]></category>
		<category><![CDATA[Embedded Resources]]></category>
		<category><![CDATA[Example]]></category>

		<guid isPermaLink="false">http://www.enusbaum.com/blog/?p=3</guid>
		<description><![CDATA[So last night I was trying to think of the best way to compile images into the WWWinamp EXE. One way I had considered was converting the images into a byte[] and then just putting this into the source code. The images I was working with were only about 200 bytes long, so this could [...]]]></description>
			<content:encoded><![CDATA[<p>So last night I was trying to think of the best way to compile images into the WWWinamp EXE.</p>
<p>One way I had considered was converting the images into a byte[] and then just putting this into the source code. The images I was working with were only about 200 bytes long, so this could be do-able.</p>
<p>Upon further investigation I came across <a href="http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=75">this</a> tutorial over at DevHood.com. It seemed a better idea to just roll with Embedded Resources in the EXE, since it would give me a few more options in the long run.</p>
<p>Below is the code I used to retrieve an embedded resource. You pass in the file name of the resource you want, and it&#8217;ll return a byte[] with the content:</p>
<p>[csharp]</p>
<p>public byte[] Server_ReadEmbeddedResource(string sFileName)<br />
{<br />
Assembly asResources = Assembly.GetExecutingAssembly(); //Referrence to the current assembly<br />
string[] sResNames = asResources.GetManifestResourceNames(); //Store list of resources for the current assembly in an array</p>
<p>foreach (string sResourceName in sResNames)<br />
{<br />
if(sResourceName.EndsWith(sFileName))<br />
{<br />
BinaryReader oBR = new BinaryReader(asResources.GetManifestResourceStream(sResourceName));<br />
return oBR.ReadBytes((int)asResources.GetManifestResourceStream(sResourceName).Length);<br />
}<br />
}<br />
return new byte[] { 0 };<br />
}</p>
<p>[/csharp]</p>
<div class="su-linkbox" id="post-3-linkbox"><div class="su-linkbox-label">Link to this post!</div><div class="su-linkbox-field"><input type="text" value="&lt;a href=&quot;http://www.enusbaum.com/blog/2007/01/embedded-resources-in-c/&quot;&gt;Embedded Resources in C#&lt;/a&gt;" onclick="javascript:this.select()" readonly="readonly" style="width: 100%;" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.enusbaum.com/blog/2007/01/embedded-resources-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

