<?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>Fabse-on-Blog &#187; coding</title>
	<atom:link href="http://blog.fabse.net/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fabse.net</link>
	<description>Was bewegt mich; was nicht!</description>
	<lastBuildDate>Fri, 20 Jan 2012 22:06:34 +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>My Visual Studio Achievements</title>
		<link>http://blog.fabse.net/2012/01/20/my-visual-studio-achievements/</link>
		<comments>http://blog.fabse.net/2012/01/20/my-visual-studio-achievements/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 22:06:34 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[Blogwelt]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/?p=617</guid>
		<description><![CDATA[Finally, you can take a look at my achievements in Visual Studio as well! You may do this as well! --- Unterst&#252;tze mich und meinen Blog und kauf dir was Nettes (&#252;ber diesen Link)<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Finally, you can take a look at my achievements in Visual Studio as well!</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="My Visual Studio Achievements" border="0" alt="My Visual Studio Achievements" src="http://blog.fabse.net/wp-content/uploads/image59.png" width="171" height="244" /></p>
<p><a title="Channel 9 - Visual Studio Achievements" href="http://channel9.msdn.com/achievements/visualstudio">You may do this</a> as well!</p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2012/01/20/my-visual-studio-achievements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>String.GetHashCode() Internals</title>
		<link>http://blog.fabse.net/2011/10/25/string-gethashcode-internals/</link>
		<comments>http://blog.fabse.net/2011/10/25/string-gethashcode-internals/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 18:11:56 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/2011/10/25/string-gethashcode-internals/</guid>
		<description><![CDATA[While I was eating dinner, I had this somehow suprising question in my mind: How is String.GetHashCode() implemented? Is it fast? It needs a linear time based on the length of the string. This is understandable if you think about &#8230; <a href="http://blog.fabse.net/2011/10/25/string-gethashcode-internals/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>While I was eating dinner, I had this somehow suprising question in my mind: How is String.GetHashCode() implemented? Is it fast?</p>
<p>It needs a linear time based on the length of the string. This is understandable if you think about what it is doing. It needs to generate a “Fingerprint”-number based on its content, so you need to take a look at all the content at least once. So it is O(N).</p>
<p>I was going to do something more useful while I noticed all the precompiler conditions. That is very interesting! The function returns different results whether it is compiled for 32bit or 64bit. The debug version of the framework (Microsoft internal only?) even changes its resulting hashcodes with every buildnumber.</p>
<blockquote><p>We want to ensure we can change our hash function daily.     <br />This is perfectly fine as long as you don&#8217;t persist the      <br />value from GetHashCode to disk or count on String A       <br />hashing before string B.&#160; Those are bugs in your code.      </p>
</blockquote>
<p>So you better avoid storing hashcodes and you should not exchange hashcodes across process-boundarys. Your communication partner may use a different number of bits!</p>
<p>Last but not least: the result is not stored but recomputed every time you call the function. The implementation is following the advice to not store its result itself.</p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2011/10/25/string-gethashcode-internals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dependency injection &amp; their Pitfalls*</title>
		<link>http://blog.fabse.net/2011/09/25/dependency-injection-their-pitfalls/</link>
		<comments>http://blog.fabse.net/2011/09/25/dependency-injection-their-pitfalls/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 17:32:56 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[Prism]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/2011/09/25/dependency-injection-their-pitfalls/</guid>
		<description><![CDATA[After I had my dependency injection set up and running, I noticed a shift in my way of developing. I started to be more focused on only one class and their implementation at a time. If I felt the need &#8230; <a href="http://blog.fabse.net/2011/09/25/dependency-injection-their-pitfalls/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>After I had my dependency injection set up and running, I noticed a shift in my way of developing. I started to be more focused on only one class and their implementation at a time. If I felt the need for another service instance, I just added it to the constructor and would go on coding. I thought that the dependency injection container would take care of how to create the new service for me.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image54.png" width="232" height="214" /></p>
<p>This is nothing fancy so far. After coding for straight 20 minutes without any testing in between I decided to test it. I noticed my machine was doing really nothing but burning cpu for a bunch of seconds and quitting then with a StackoverflowException. I had no idea what was going on.</p>
<p>The exception was not really telling too much about the problem. The only thing was a truncated stacktrace. It had something to do with the container trying to create an instance of a service. Without any further information it would be hard to pinpoint this so I decided to search for trace information. I am using <a href="http://compositewpf.codeplex.com/" target="_blank">Microsoft Prism</a> with the Unity container for inversion of control. So does Unity provide any traces of what is going on? Surprisingly, this is not the case! There is no magic switch.</p>
<p>So I had no choice but removing constructor arguments here and there until I found the root problem. I had managed to create a circular reference:</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image61.png" width="232" height="214" /></p>
<p><a href="http://msdn.microsoft.com/en-us/library/ff660897%28v=pandp.20%29.aspx" target="_blank">The MSDN</a> is telling me, that it is my responsibility to prevent this and it also warns of endless recursion. Endless recursion always ends with an StackoverflowException.</p>
<p>My solution was simple. I removed the circular reference through removing one reference. It was not used anyway.</p>
<p><em>*The name of this article is freely leaned on the name of the blog </em><a href="http://eai-technologies-and-their-pitfalls.blogspot.com/" target="_blank"><em>EAI Technologies &amp; their Pitfalls</em></a><em> of an ex coworker</em> <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://blog.fabse.net/wp-content/uploads/wlEmoticon-winkingsmile3.png" /></p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2011/09/25/dependency-injection-their-pitfalls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make static legacy code testable</title>
		<link>http://blog.fabse.net/2011/09/09/how-to-make-static-legacy-code-testable/</link>
		<comments>http://blog.fabse.net/2011/09/09/how-to-make-static-legacy-code-testable/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 14:32:37 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[mocking]]></category>
		<category><![CDATA[unittesting]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/2011/09/09/how-to-make-static-legacy-code-testable/</guid>
		<description><![CDATA[I had the opportunity to work in a team developing and improving a large legacy application. The project had some unit tests already but there was a long way to go in terms of increasing the test coverage. Many internal &#8230; <a href="http://blog.fabse.net/2011/09/09/how-to-make-static-legacy-code-testable/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I had the opportunity to work in a team developing and improving a large legacy application. The project had some unit tests already but there was a long way to go in terms of increasing the test coverage.</p>
<p>Many internal services are implemented as a bunch of static methods like so:</p>
<pre class="code"><span style="color: blue"><strong>static</strong> class </span><span style="color: #2b91af">SeriousService
</span>{
    <span style="color: blue">public <strong>static</strong> int </span>DoSomething(<span style="color: blue">string </span>value)
    {
        <span style="color: green">//&lt;side effects here&gt;
        </span><span style="color: blue">return </span>17;
    }
}</pre>
<p>And the usages of these static classes are all over the place like so:</p>
<pre class="code"><span style="color: blue">class </span><span style="color: #2b91af">SomeModule
</span>{
    <span style="color: blue">public void </span>ExecuteOrder(<span style="color: #2b91af">Order </span>order)
    {
        <span style="color: green">//...
        </span><span style="color: #2b91af">SeriousService</span>.<strong>DoSomething</strong>(order.Name);
        <span style="color: green">//...
    </span>}
}</pre>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image51.png" width="423" height="88" /></p>
<p>The challenge was to write a unit test which would test ExecuteOrder() without side effects in SeriousService.</p>
<p>A state-of-the-art application would insert the service through dependency injection into SomeModule. You could provide a mock for the service and you would be ready to write your unittest.</p>
<p>Unluckily, changing the caller or the signature of the callee was no option to me. The chance to introduce incompatibilities somewhere in the huge family of applications and tools was to high.</p>
<p>After some thinking I came up with the idea to extract the functionality out of the static service:</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image52.png" width="609" height="240" /></p>
<p>The “new” static service endpoint has now a private static reference to the service implementation and all public methods forward there calls to this implementation. The new service implementation is based on an extracted interface. Caller and callee are still unchanged (red rectangle). In code, it looks like so:</p>
<pre class="code"><span style="color: blue">interface </span><span style="color: #2b91af">ISeriousService
</span>{
    <span style="color: blue">int </span>DoSomething(<span style="color: blue">string </span>value);
}

<span style="color: blue">class </span><span style="color: #2b91af">SeriousServiceImpl </span>: <span style="color: #2b91af">ISeriousService
</span>{
    <span style="color: blue">public int </span>DoSomething(<span style="color: blue">string </span>value)
    {
        <span style="color: green">//&lt;side effects here&gt;
        </span><span style="color: blue">return </span>17;
    }
}

<span style="color: blue">static class </span><span style="color: #2b91af">SeriousService
</span>{
    <span style="color: blue">private static </span><span style="color: #2b91af">ISeriousService </span>_seriousService
                            = <span style="color: blue">new </span><span style="color: #2b91af">SeriousServiceImpl</span>();

    <span style="color: green">//Static endpoint
    </span><span style="color: blue">public static int </span>DoSomething(<span style="color: blue">string </span>value)
    {
        <span style="color: blue">return </span>_seriousService.DoSomething(value);
    }
}</pre>
<p>Until here, all we have done is to insert another level of indirection. But this enables us to replace the real functionality of the service with a mock:</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image53.png" width="634" height="247" /></p>
<p>This is possible if the service “endpoint” gets a public method to replace its implementation:</p>
<pre class="code"><span style="color: blue">static class </span><span style="color: #2b91af">SeriousService
</span>{
    <span style="color: blue">private static </span><span style="color: #2b91af">ISeriousService </span>_seriousService
                            = <span style="color: blue">new </span><span style="color: #2b91af">SeriousServiceImpl</span>();

<strong>    <span style="color: blue">public static void </span>ReplaceServiceImpl(<span style="color: #2b91af">ISeriousService </span>newImpl)
    {
        _seriousService = newImpl;
    }</strong>

    <span style="color: green">//Static endpoint
    </span><span style="color: blue">public static int </span>DoSomething(<span style="color: blue">string </span>value)
    {
        <span style="color: blue">return </span>_seriousService.DoSomething(value);
    }
}</pre>
<p>Having all of this in place you can write your unit test for the module without the fear of any unforseen sideeffects:</p>
<pre class="code">[<span style="color: #2b91af">TestFixture</span>]
<span style="color: blue">class </span><span style="color: #2b91af">SomeModuleTest
</span>{
    [<span style="color: #2b91af">Test</span>]
    <span style="color: blue">public void </span>ExecuteOrder_handles_condition_xyz()
    {
        <span style="color: green">//Setup
        </span><span style="color: blue">var </span>service = <span style="color: blue">new </span><span style="color: #2b91af">Mock</span>&lt;<span style="color: #2b91af">ISeriousService</span>&gt;();
        <span style="color: #2b91af">SeriousService</span>.<strong>ReplaceServiceImpl</strong>(service.Object);

        <span style="color: green">//Execute
        </span><span style="color: blue">new </span><span style="color: #2b91af">SomeModule</span>().ExecuteOrder(<span style="color: blue">new </span><span style="color: #2b91af">Order</span>());

        <span style="color: green">//Asserts here
    </span>}
}</pre>
<p>There is one more thing left to be done. Obviously the real instance of SeriousServiceImpl is gone for good after executing the test. So if you want to be able to reuse the current AppDomain for another test you either need to recover it somehow or you have to replace it in every test. I have a nice solution for this as well but this article is already long enough.</p>
<p>So summing up, we saw how to introduce another level of indirection into our architecture. We used it to swap the implementation of a static service as was needed to write unit tests without side effects.</p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2011/09/09/how-to-make-static-legacy-code-testable/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>String.Split() Kwik-e</title>
		<link>http://blog.fabse.net/2011/09/01/string-split-kwik-e/</link>
		<comments>http://blog.fabse.net/2011/09/01/string-split-kwik-e/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 09:23:30 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Kwik-e]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/?p=580</guid>
		<description><![CDATA[While I was cleaning up some legacy code I found an overly complex usage of String.Split() in several places: var sentence = &#34;Hello World!&#34;; var words = sentence.Split(new char[] { ' ' }); If you take a look at the &#8230; <a href="http://blog.fabse.net/2011/09/01/string-split-kwik-e/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>While I was cleaning up some legacy code I found an overly complex usage of String.Split() in several places:</p>
<pre class="code"><span style="color: blue">var </span>sentence = <span style="color: #a31515">&quot;Hello World!&quot;</span>;
<span style="color: blue">var </span>words = sentence.Split(<span style="color: blue">new char</span>[] { <span style="color: #a31515">' ' </span>});</pre>
<p>If you take a look at the available overloads on Split() you may miss the params keyword. In fact it isn’t even visible on the overview page:</p>
<p><a href="http://msdn.microsoft.com/de-de/library/y7h14879%28v=VS.100%29.aspx"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image49.png" width="326" height="329" /></a></p>
<p>But if you take a closer look on Split(char[]) you will see this:</p>
<p><a href="http://msdn.microsoft.com/de-de/library/b873y76a.aspx"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image50.png" width="229" height="53" /></a></p>
<p>The params keyword tells you that the method accepts any number of arguments of type char. So you could also provide only one, which will simplify the given sample to:</p>
<pre class="code"><span style="color: blue">var </span>sentence = <span style="color: #a31515">&quot;Hello World!&quot;</span>;
<span style="color: blue">var </span>words = sentence.Split(<span style="color: #a31515">' '</span>);</pre>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2011/09/01/string-split-kwik-e/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linq Kwik-e</title>
		<link>http://blog.fabse.net/2011/08/29/linq-kwik-e/</link>
		<comments>http://blog.fabse.net/2011/08/29/linq-kwik-e/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 21:19:46 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Kwik-e]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/?p=572</guid>
		<description><![CDATA[Really often I use the Linq extension methods to formulate a query to reduce a set of data to a single value. Most of the time I refer to the First() method for this use case. var fabse = myList.Where(p &#8230; <a href="http://blog.fabse.net/2011/08/29/linq-kwik-e/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Really often I use the Linq extension methods to formulate a query to reduce a set of data to a single value. Most of the time I refer to the First() method for this use case.</p>
<pre class="code"><span style="color: blue;">var </span>fabse = myList.Where(p =&gt; p.Name == <span style="color: #a31515;">"Fabse"</span>).First();</pre>
<p>There are several ways to improve this scenario. First has an overload where it accepts a predicate function, so the following example yields the same result:</p>
<pre class="code"><span style="color: blue;">var </span>fabse = myList.First(p =&gt; p.Name == <span style="color: #a31515;">"Fabse"</span>);</pre>
<p>But what happens if your list has no elements fulfilling your filter? First() will throw an exception. It is considered bad style to use exceptions to handle program flow. But is quite hard sticking to First() and avoiding the exception at the same time.</p>
<p>It is better to use FirstOrDefault() if there is the possibility of not getting any result. If there is no result, the default for the inferred data type is used, which is null for all reference types and 0 (zero) or false for int/float/double/… and bool. Sample:</p>
<pre class="code"><span style="color: blue;">var </span>fabse = myList.FirstOrDefault(p =&gt; p.Name == <span style="color: #a31515;">"Fabse"</span>);
<span style="color: blue;">if </span>(fabse != <span style="color: blue;">null</span>)
{
    <span style="color: green;">//use fabse ;-</span><span style="color: green;">)
</span>}</pre>
<p>Today I discovered the functions Single() and SingleOrDefault() which have nearly the same semantics but they will test the data source for further hits regarding your predicate. If there are other hits, you will see an InvalidOperationException.</p>
<p>I like this behavior very much because I often search for the existence of a somehow special object and based on this existence I do something or not. If there is more than one of these special objects, there is most likely something wrong with the data and it is better to stop the process and to examine the data. So an exception feels right at this moment.</p>
<p>To finish up this kwik-e: First() will give you the first (duh!) element while Last() and LastOrDefault() will give you the last element.</p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2011/08/29/linq-kwik-e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NuGet: +1</title>
		<link>http://blog.fabse.net/2011/08/14/nuget-1/</link>
		<comments>http://blog.fabse.net/2011/08/14/nuget-1/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 01:04:29 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/2011/08/14/nuget-1/</guid>
		<description><![CDATA[It really couldn’t be easier! --- Unterst&#252;tze mich und meinen Blog und kauf dir was Nettes (&#252;ber diesen Link)<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>It really couldn’t be easier!</p>
<p><a href="http://blog.fabse.net/wp-content/uploads/image48.png" rel="lightbox[571]"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image_thumb8.png" width="453" height="201" /></a></p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2011/08/14/nuget-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Erste Schritte mit RavenDB</title>
		<link>http://blog.fabse.net/2011/04/25/erste-schritte-mit-ravendb/</link>
		<comments>http://blog.fabse.net/2011/04/25/erste-schritte-mit-ravendb/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 20:47:00 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[RavenDB]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/2011/04/25/erste-schritte-mit-ravendb/</guid>
		<description><![CDATA[…sind ganz einfach! Runterladen, entpacken und Server starten über Batchdatei. Dann eines der Samples öffnen – bei mir war es SimpleClient. RavenDB ist eine schema-lose Dokumentendatenbank und damit Vertreter der NoSQL-Bewegung. Zugriffe erfolgen über REST. Es gibt eine .Net ClientAPI &#8230; <a href="http://blog.fabse.net/2011/04/25/erste-schritte-mit-ravendb/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>…sind ganz einfach! Runterladen, entpacken und Server starten über Batchdatei. Dann eines der Samples öffnen – bei mir war es SimpleClient.</p>
<p><a href="http://ravendb.net/" target="_blank">RavenDB</a> ist eine schema-lose Dokumentendatenbank und damit Vertreter der <a href="http://de.wikipedia.org/wiki/NoSQL_%28Konzept%29" target="_blank">NoSQL</a>-Bewegung. Zugriffe erfolgen über <a href="http://de.wikipedia.org/wiki/Representational_State_Transfer" target="_blank">REST</a>. Es gibt eine .Net ClientAPI und mit der kann man in 3 Zeilen jedes beliebige Objekt in die Datenbank schreiben. Ich bin echt beeindruckt, wie unerwartet unkompliziert das geht.</p>
<p>Ich habe eine halbwegs klare Projektidee im Kopf, so musste ich einige konkrete Fragen klären, die durch das Lesen von <a href="http://ayende.com/blog/default.aspx" target="_blank">Ayendes Blog</a> (Tipp!!!) nicht zu klären waren.</p>
<p>Kann man RavenDB embedded hosten? Ja! Neben dem Hosten über einen Windows Service oder über den IIS kann man auch im Client selbst die Datenbank hosten womit das ganze zu einer Standalone-App wird.</p>
<p>Wie gut kommt es mit Blobs klar? Hier habe ich lange probiert. Zuerst hatte ich immer ein Byte-Array in meinen Objekten, was aber schnell zu OutOfMemory-Situationen führt. Ich hatte mit ca. 1000 Objekten mit je 3mb Inhalt zu tun. Es erfolgt eine Base64-Codierung bei der Übertragung so dass zu einem Zeitpunkt in Server und Client in Summe vermutlich mindestens 4 Varianten gehalten werden. Wenn man die richtigen Google-Suchwörter verwendet, findet man heraus, dass RavenDB auch <a href="http://groups.google.com/group/ravendb/browse_thread/thread/7b73377adf3e09cd/43deb6f4db4ca9af?lnk=gst&amp;q=Attachments#43deb6f4db4ca9af" target="_blank">Attachments</a> als Konzept versteht. Hier gibt es wohl keine Transaktionalität aber dafür Performance! Mir gelang es, ein Attachment mit 335mb in 66s in die Datenbank zu pumpen, was für meine Anforderungen vollkommen genügt. Bei dem nächstgrößeren Versuch mit 500mb kam es zu einer OutOfMemoryException, aber das ist ok. Attachments können übrigens auch direkt durch einen Browser geladen werden!</p>
<p>Sollte jetzt der Eindruck entstanden sein, dass RavenDB langsam ist, dann muss ich dem Widersprechen. Mir gelang es die 1000 Objekte nur mit Metadaten und ohne Blobs in unter einer Sekunde in die Datenbank zu laden.</p>
<p>Ich bin sehr beendruckt von RavenDB und kann jedem nur empfehlen, sich selbst einen Eindruck zu verschaffen.</p>
<p><em>Mein Ostermontag ist jedenfalls gut angelegt</em> <img class="wlEmoticon wlEmoticon-openmouthedsmile" style="border-style: none;" src="http://blog.fabse.net/wp-content/uploads/wlEmoticon-openmouthedsmile.png" alt="Open-mouthed smile" /></p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2011/04/25/erste-schritte-mit-ravendb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create insert script including data with SQL Server Management Studio [for real]</title>
		<link>http://blog.fabse.net/2010/12/08/create-insert-script-including-data-with-sql-server-management-studio-for-real/</link>
		<comments>http://blog.fabse.net/2010/12/08/create-insert-script-including-data-with-sql-server-management-studio-for-real/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 16:13:57 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[Büroleben]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[im Netz gefunden]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/2010/12/08/create-insert-script-including-data-with-sql-server-management-studio-for-real/</guid>
		<description><![CDATA[After a co-worker of me had not been able to find the right option (but was able to help hisself anyway) I decided to share the trick: Right click your database, select “Tasks”, then “Generate Scripts”: Follow the wizzard, but &#8230; <a href="http://blog.fabse.net/2010/12/08/create-insert-script-including-data-with-sql-server-management-studio-for-real/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://stefanscheller.wordpress.com/2010/12/06/create-insert-script-including-data-with-sql-server-management-studio/" target="_blank">After a co-worker of me had not been able to find the right option</a> (but was able to help hisself anyway) I decided to share the trick:</p>
<p>Right click your database, select “Tasks”, then “Generate Scripts”:</p>
<p><a href="http://blog.fabse.net/wp-content/uploads/image41.png" rel="lightbox[495]"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image_thumb5.png" width="447" height="606" /></a></p>
<p>Follow the wizzard, but change the option to script data to true:</p>
<p><a href="http://blog.fabse.net/wp-content/uploads/image42.png" rel="lightbox[495]"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image_thumb6.png" width="446" height="400" /></a></p>
<p>You should be able to figure out everything else on your own.</p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2010/12/08/create-insert-script-including-data-with-sql-server-management-studio-for-real/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uninstall von Microsoft SharePoint Services 3.0 endet aprubt</title>
		<link>http://blog.fabse.net/2010/10/21/uninstall-von-microsoft-sharepoint-services-3-0-endet-aprubt/</link>
		<comments>http://blog.fabse.net/2010/10/21/uninstall-von-microsoft-sharepoint-services-3-0-endet-aprubt/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 12:48:59 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/2010/10/21/uninstall-von-microsoft-sharepoint-services-3-0-endet-aprubt/</guid>
		<description><![CDATA[Man muss die SharePoint Services deinstallieren, bevor man den SharePoint Server installieren kann. Bei mir endete dieses Uninstall sehr früh, aber auch ohne Fehlermeldung. Repair half nicht. Geholfen hat aber, im IIS alle SharePoint-Sites zu löschen, alle Application Pools zu &#8230; <a href="http://blog.fabse.net/2010/10/21/uninstall-von-microsoft-sharepoint-services-3-0-endet-aprubt/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Man muss die SharePoint Services deinstallieren, bevor man den SharePoint Server installieren kann.</p>
<p>Bei mir endete dieses Uninstall sehr früh, aber auch ohne Fehlermeldung. Repair half nicht. Geholfen hat aber, im IIS alle SharePoint-Sites zu löschen, alle Application Pools zu löschen und auch im SQL Server alle SharePoint Datenbanken zu droppen. Jetzt läuft das Uninstall und ist auch schon fast durch.</p>
<p>Ursache ist wohl, dass das Entwicklungsimage, auf dem ich arbeite, durch Kopieren und Umbenennen entstanden ist, denn die alten App-Pools liefen auf ALTERRECHNER\Administrator, was dann wohl auch zu der IdentityNotMappedException führte, welche ich im Eventlog gesehen habe.</p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2010/10/21/uninstall-von-microsoft-sharepoint-services-3-0-endet-aprubt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blogtipp des Tages: Ayende @ Rahien</title>
		<link>http://blog.fabse.net/2010/09/16/blogtipp-des-tages-ayende-rahien/</link>
		<comments>http://blog.fabse.net/2010/09/16/blogtipp-des-tages-ayende-rahien/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 06:37:11 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Blogwelt]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[im Netz gefunden]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/2010/09/16/blogtipp-des-tages-ayende-rahien/</guid>
		<description><![CDATA[Er postet viel anspruchsvolle Gedanken und Probleme im täglichen .Net Code-Alltag mit speziellem Fokus auf Datenbanken, Persistenz, NHibernate und seinen NHibernateProfiler… Ich glaube er schläft nie und tut den ganzen Tag nichts anderes, aber wenn man selbst mal Zeit hat, &#8230; <a href="http://blog.fabse.net/2010/09/16/blogtipp-des-tages-ayende-rahien/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Er postet viel anspruchsvolle Gedanken und Probleme im täglichen .Net Code-Alltag mit speziellem Fokus auf Datenbanken, Persistenz, NHibernate und seinen NHibernateProfiler…</p>
<p>Ich glaube er schläft nie und tut den ganzen Tag nichts anderes, aber wenn man selbst mal Zeit hat, sind seine Beiträge immer interessant und auch die Kommentare sind idR sehr qualitativ.</p>
<p><a title="Ayende @ Rahien" href="http://ayende.com/Blog/Default.aspx">Ansehen!</a></p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2010/09/16/blogtipp-des-tages-ayende-rahien/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BizTalk: Sending emails with attachments using a pipeline component</title>
		<link>http://blog.fabse.net/2010/06/25/biztalk-sending-emails-with-attachments-using-a-pipeline-component/</link>
		<comments>http://blog.fabse.net/2010/06/25/biztalk-sending-emails-with-attachments-using-a-pipeline-component/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 06:33:02 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/?p=456</guid>
		<description><![CDATA[There are several locations on the web where you are told how to send emails and also how to send attachments with them as well. I had a working piece of code doing exactly this but I had to redo &#8230; <a href="http://blog.fabse.net/2010/06/25/biztalk-sending-emails-with-attachments-using-a-pipeline-component/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>There are <a href="http://www.tech-archive.net/Archive/BizTalk/microsoft.public.biztalk.general/2006-12/msg00141.html">several locations</a> on the web where you are told how to send emails and also how to send attachments with them as well.</p>
<p>I had a working piece of code doing exactly this but I had to redo it using a pipeline componentan instead of an orchestration.</p>
<p>Everything is straightforward. If you had set the context value in your orchestration like this:</p>
<p>EmailOut(SMTP.MessagePartsAttachments) = 2;</p>
<p>you would take a look in <a href="http://msdn.microsoft.com/en-us/library/smtp.messagepartsattachments%28BTS.10%29.aspx">the msdn</a> to get the values right and then translate it to the following code in your pipeline component:</p>
<p>inmsg.Context.Write(&#8220;MessagePartsAttachments&#8221;,<br />
&#8220;http://schemas.microsoft.com/BizTalk/2003/smtp-properties&#8221;, 2);</p>
<p>I did this with every context value and tested it. It worked well but there was no attachment?! But there was also no error!</p>
<p>Finding the solution took me more time then I am willing to admit&#8230;</p>
<p>If you take a sharp look in the MSDN then you might find this:</p>
<p>[SerializableAttribute]<br />
[GuidAttribute("9EE763F5-ECE7-42f6-BE97-38EA64FB7607")]<br />
[IsSensitivePropertyAttribute(false)]<br />
[PropertyGuidAttribute("9EE763F5-ECE7-42f6-BE97-38EA64FB7607")]<br />
[PropertyTypeAttribute("MessagePartsAttachments",<br />
"http://schemas.microsoft.com/BizTalk/2003/smtp-properties",<br />
<strong>"unsignedInt", "System.UInt32"</strong>)]<br />
public sealed class MessagePartsAttachments : MessageContextPropertyBase</p>
<p>I was desperate at best and tried everything and this one worked:</p>
<p>inmsg.Context.Write(&#8220;MessagePartsAttachments&#8221;,<br />
&#8220;http://schemas.microsoft.com/BizTalk/2003/smtp-properties&#8221;, <strong>(UInt32)</strong>2);</p>
<p>You cannot see any difference at all if you take a look at a suspended/tracked message but this was the cause of the missing attachments. I hope this might save you some time!</p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2010/06/25/biztalk-sending-emails-with-attachments-using-a-pipeline-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ich dachte mir gleich, dass da was faul ist!</title>
		<link>http://blog.fabse.net/2010/03/24/ich-dachte-mir-gleich-dass-da-was-faul-ist/</link>
		<comments>http://blog.fabse.net/2010/03/24/ich-dachte-mir-gleich-dass-da-was-faul-ist/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 19:01:12 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/2010/03/24/ich-dachte-mir-gleich-dass-da-was-faul-ist/</guid>
		<description><![CDATA[Die anderen Überladungen von Match() tun dann aber ihren Job richtig… --- Unterst&#252;tze mich und meinen Blog und kauf dir was Nettes (&#252;ber diesen Link)<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.fabse.net/wp-content/uploads/image33.png" rel="lightbox[453]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image_thumb2.png" width="450" height="394" /></a> </p>
<p>Die anderen Überladungen von Match() tun dann aber ihren Job richtig…</p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2010/03/24/ich-dachte-mir-gleich-dass-da-was-faul-ist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Streaminhalt im Debugger</title>
		<link>http://blog.fabse.net/2010/02/17/streaminhalt-im-debugger/</link>
		<comments>http://blog.fabse.net/2010/02/17/streaminhalt-im-debugger/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 10:32:11 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Lösung]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/?p=442</guid>
		<description><![CDATA[Sitzt man mal wieder vor dem Debugger und interessiert sich, was nun eigentlich für Daten in diesem Stream stehen, dann hilft das Immediate Window. Aber selbst damit ist es mir bisher nicht unbedingt einfach gefallen. Folgendes Snippet erfüllt den Job &#8230; <a href="http://blog.fabse.net/2010/02/17/streaminhalt-im-debugger/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Sitzt man mal wieder vor dem Debugger und interessiert sich, was nun eigentlich für Daten in diesem Stream stehen, dann hilft das Immediate Window. Aber selbst damit ist es mir bisher nicht unbedingt einfach gefallen.</p>
<p>Folgendes Snippet erfüllt den Job aber als Einzeiler:</p>
<pre>File.WriteAllText("c:\\streamOut.txt", new StreamReader(meinStream).ReadToEnd());</pre>
<p>Zu beachten ist, dass je nach Typ von meinStream die Position anschließend zurück gesetzt werden muss oder auch, das dies gar nicht möglich ist und daher die weitere Programmausführung fehlerhaft wird.</p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2010/02/17/streaminhalt-im-debugger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BizTalk: Verschiedene Receives in Kombination mit Correlation Sets</title>
		<link>http://blog.fabse.net/2010/02/14/biztalk-verschiedene-receives-in-kombination-mit-correlation-sets/</link>
		<comments>http://blog.fabse.net/2010/02/14/biztalk-verschiedene-receives-in-kombination-mit-correlation-sets/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 18:38:38 +0000</pubDate>
		<dc:creator>Fabse</dc:creator>
				<category><![CDATA[BizTalk]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Lösung]]></category>

		<guid isPermaLink="false">http://blog.fabse.net/2010/02/14/biztalk-verschiedene-receives-in-kombination-mit-correlation-sets/</guid>
		<description><![CDATA[Ausgangslage ist eine Orchestration, die eine Nachricht empfängt und auf Grundlage dieser Nachricht verschiedene Aktionen ausführt. Aus der ersten Nachricht ist auch abzuleiten, ob weitere Nachrichten empfangen werden müssen um die Aufgabe zu leisten. Ich hatte nun den Fall, dass &#8230; <a href="http://blog.fabse.net/2010/02/14/biztalk-verschiedene-receives-in-kombination-mit-correlation-sets/">Continue reading <span class="meta-nav">&#8594;</span></a><p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Ausgangslage ist eine Orchestration, die eine Nachricht empfängt und auf Grundlage dieser Nachricht verschiedene Aktionen ausführt. Aus der ersten Nachricht ist auch abzuleiten, ob weitere Nachrichten empfangen werden müssen um die Aufgabe zu leisten.</p>
<p>Ich hatte nun den Fall, dass ich neben dem schon existierenden Pfad(linker Teil der Grafik) einen zusätzlichen Fall hatte, bei dem ein Direct Receive aus der MessageBox nötig war. Kommt die Nachricht aus der MessageBox, ist (für diesen Fall) klar, dass es keine Folgenachrichten gibt.</p>
<p>Man kann eine Orchestration nun nicht nur über ein Receive-Shape starten lassen, sondern auch auch über mehrere Receives, die in einem Listen-Shape untergebracht wurden. Das hatte ich dann auch versucht.</p>
<p><a href="http://blog.fabse.net/wp-content/uploads/image32.png" rel="lightbox[441]"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blog.fabse.net/wp-content/uploads/image_thumb1.png" width="443" height="421" /></a> </p>
<p>Auch wenn aus logischer Sicht kein Pfad möglich ist, der vom Direct Receive zum “Receive Follower” führt, verwehrt BizTalk die Kompilierung dieser Orchestration.</p>
<p>Der Versuch, den Receive aus dem Receive Port durch einen Filter auf der MessageBox zu formulieren fruchtete ebenfalls nicht. Finales Ergebnis war, die gemeinsame Funktionalität in einer separaten Orchestration auszulagern und für den Direct Receive eine zusätzliche Orchestration zu bauen, die einen Call macht.</p>
<p>Außerdem ist die Fehlermeldung “unknown system error” auch sehr hilfreich beim Finden des eigentlichen Problems, denn eigentlich ist die Orchestration viel größer, als hier auf dem Screenshot zu sehen.</p>
<p><br /><br />---<br />
<a href="https://www.amazon.de/?&tag=fabsenetfabse-21">Unterst&uuml;tze mich und meinen Blog und kauf dir was Nettes (&uuml;ber diesen Link)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabse.net/2010/02/14/biztalk-verschiedene-receives-in-kombination-mit-correlation-sets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

