<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>Dariusz quatscht : Coding</title><link>http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx</link><description>Tags: Coding</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Die Qual der Wahl – Blogengines</title><link>http://blogs.msdn.com/dparys/archive/2009/09/01/die-qual-der-wahl-blogengines.aspx</link><pubDate>Tue, 01 Sep 2009 18:28:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9889923</guid><dc:creator>dparys</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9889923.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9889923</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9889923</wfw:comment><description>&lt;p&gt;In letzter Zeit spiele ich mit dem Gedanken meinen Blog umzuziehen. Nicht komplett, eigentlich nur einen Teil. Alles andere bleibt hier, wie gehabt. Doch das Vorhaben ist gar nicht so einfach wie ich Anfangs dachte. Die Kriterien die ich an eine eigene Hosting Lösung habe sind überschaubar: einfache Anpassparkeit, Erweiterungsfähig um z.B. neue Funktionalität zu implementieren, Verwaltungsseiten um Kommentare und Beiträge im Web zu editieren und zu guter Letzt eine Codebasis in der ich mich schnell zurecht finde. Die Anpassbarkeit wäre auch im Code für mich ok, voraussgesetzt es ist eine einfach zu verstehende Codebasis. Mein derzeitiger Blog gibt mir nicht die Möglichkeit mal kurz einen neuen Trend zu implementieren bzw. auch nur per Template einzufügen. Die Codebasis ist alt und ein Update steht noch aus und ist derzeit auch nicht angekündigt. Also habe ich verschiedene Engines in Betracht gezogen.&lt;/p&gt;  &lt;h2&gt;&lt;a href="http://wordpress.org/"&gt;Wordpress&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;Mein Kollege &lt;a href="http://www.the-oliver.com"&gt;Oliver Scheer&lt;/a&gt; ist begeistert von &lt;a href="http://wordpress.org/"&gt;Wordpress&lt;/a&gt;. Einfache Installation, einfache Anpassbarkeit, gute Themes und erweitern kann man das ganze auch – vorausgesetzt – man hat die Lust und die Muse sich mit PHP auseinanderzusetzen. Nix gegen PHP, aber ich komme jetzt schon mit viel zu vielen Technologien in Kontakt und da möchte ich mir die Einarbeitung, bzw. alleine das Arbeiten damit ersparen. Sonst wäre Wordpress in Sachen Funktionalität und Themes meine erste Wahl geworden.&lt;/p&gt;  &lt;h2&gt;&lt;a href="http://dasblog.codeplex.com/"&gt;dasBlog&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;Der Klassiker. Ich erinnere mich immer noch, als wäre es erst gestern gewesen, wie &lt;a href="http://blogs.msdn.com/clemensv/"&gt;Clemens&lt;/a&gt; auf einem CLIP Meeting der Community seine 60.000 Zeilen Code geschenkt hat. Clemens hat damals die Engine von &lt;a href="http://www.simplegeek.com"&gt;Chris Anderson&lt;/a&gt; – Blogx – als Grundlage für &lt;a href="http://dasblog.codeplex.com/"&gt;dasBlog&lt;/a&gt; verwendet. Am Anfang gab es noch keine SQL Unterstützung aber mittlerweile ist das gesamte Softwarepaket zu einem richtigen Monster ausgewachsen welches man sich auf &lt;a title="http://dasblog.codeplex.com/" href="http://dasblog.codeplex.com/"&gt;http://dasblog.codeplex.com/&lt;/a&gt; besorgen kann. An für sich erfüllt dasBlog die Kriterien der Anpassparkeit, Erweiterbarkeit und sogar die Codebasis ist mittlerweile auf .NET 2.0, doch irgendwie werde ich nicht warm damit. Das mag an der ersten Erfahrung liegen. Ich habe keinen IIS auf meiner Maschine installiert doch dasBlog ist wie ein Biest und Redirected an manchen Stellen von &lt;a href="http://localhost:1234"&gt;http://localhost:1234&lt;/a&gt; –&amp;gt; &lt;a href="http://localhost"&gt;http://localhost&lt;/a&gt;. Sprich, wer nicht gleich einige Zeit in die Codebasis stecken möchte, sollte einen IIS irgendwo zur Verfügung haben, hätte ich zwar, aber eben nicht auf allen Entwicklermaschinen. &lt;/p&gt;  &lt;h2&gt;&lt;a href="http://www.dotnetblogengine.net"&gt;BlogEngine.NET 1.5&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;In aller Munde in den letzten Monaten und vom Hören – Sagen, mein Favorit. Die Codebasis ist moderner, das Paket kommt mit ein paar mittelmässigen Themes und vom Aufbau her ist alles recht kompakt. Daraufhin habe ich angefangen einige Experimente mit der Engine zu machen und ja, man könnte recht schnell was hinbasteln. Und ich habe auch irgendwie das Gefühl das es sich um basteln handelt. Trotz des Bastelgefühls arbeite ich mal mit der Engine weiter.&lt;/p&gt;  &lt;p&gt;Da stehe ich nun mit einer ersten Version meines Experiments und frage mich wie ich nun meine bisherigen Blog Posts in die Engine bekomme – &lt;a href="http://blogml.org/"&gt;BlogML&lt;/a&gt; ist hier das Zauberwort. BlogML erlaubt es Blogs zu exportieren und in andere Engines zu importieren. Vorausgesetzt beide Blogengines unterstützen dieses Format. BlogML ist bei der BlogEngine.NET 1.5 dabei. Cool. Doch nach einigen Suchen für meinen momentanen Blog stelle ich fest das der Community Server über ein Dashboard Server Control für BlogML erweitert werden kann und bei meinem Blog gibt es dieses Control nicht. Auch bin ich nicht der Admin der Maschine. Keine Chance also.&lt;/p&gt;  &lt;p&gt;Komme ich nicht drumherum einen RSS Exporter –&amp;gt; BlogML zu schreiben? Auf Codeplex gibt es zwar einen allerdings nicht für die Community Server Engine in der Version in welcher die MSDN Blogs gehostet sind. “Vielleicht sind ja die alten Posts auch auf dem alten Blog gut aufgehoben”, denke ich mir dann.&lt;/p&gt;  &lt;p&gt;Wie gesagt, ich probiere einige Sachen mit der &lt;a href="http://www.dotnetblogengine.net"&gt;BlogEngine.NET 1.5&lt;/a&gt; aus, beim Anpassen stelle ich fest das es keine Verwaltungsseite für Blogposts gibt. Vielleicht habe ich nur was übersehen, ich mache weiter. Ich suche nach Themes, finde eigentlich nichts was mir gefällt, also mache ich mir selbst eines. Nun, was soll ich sagen, ich komme schon klar mit dem Konzept der Usercontrols, aber es ist mir irgendwie zu frickelig. Warum? Weil ich die Engine nicht so gut kenne und mir erst noch das Widget Control und dessen CSS Styles reinziehen mussl. Das einarbeiten in den Source ist ok, aber wie immer nerven mich die Kommentare. Vor allem wenn diese einfach nur Platz im Sourcefenster wegnehmen und keinen, wirklich keinen Mehrwert liefern.&lt;/p&gt;  &lt;h2&gt;Eine eigene Engine?&lt;/h2&gt;  &lt;p&gt;Vor einigen Tagen hat &lt;a href="http://blog.wekeroad.com/"&gt;Rob Connery&lt;/a&gt; auf seinem Blog über ein mögliches Aushängeschild von Entwicklern geschrieben: &lt;a href="http://blog.wekeroad.com/blog/be-a-good-jedi-build-your-own-blog/"&gt;Be a good Jedi: Build your own Blog&lt;/a&gt;. Eigentlich ist es unsinnig eine eigene Blogengine zu schreiben, es gibt doch schon einen Haufen, auf der anderen Seite ist es auch unsinnig sich lange in den Code von anderen reinzuarbeiten um nur einen Blog zu hosten. Vielleicht sind meine Ansprüche zu hoch? Eigentlich nicht. Vielleicht sind die Engines nur aufgeblasen weil diese eben eine Masse an Nutzern bedienen sollen. dasBlog und die BlogEngine.NET sind Softwarepakete die sowohl Benutzern wie auch Entwicklern gefallen sollen, von denen ich nur einen Teil benötige. Um diesen Teil einfach zu erhalten muss ich aber einen gewissen Aufwand reinstecken, da die Anpassbarkeit nicht so einfach ist wie bei Wordpress (ich rede hierbei nicht von der Erweiterung durch PHP). &lt;/p&gt;  &lt;p&gt;Vielleicht macht es doch Sinn eine eigene Engine zu schreiben? Warum stelle ich mir eigentlich diese Frage? Nein, macht es nicht. Zumindest nicht für mich. Aber ich kann gut nachvollziehen das Entwickler schnell mal daran denken. Ist ja eigentlich für eine Custom Engine auch relative einfach die Grundfunktionalität zu bauen. Man benötigt ja dann keine ausgeklügelte UI um Anpassungen zu machen, denn man kennt ja die Engine In- und Auswendig.&lt;/p&gt;  &lt;p&gt;Softwareentwickler neigen gerne ein Produkt oder ein Framework wieder neu zu erfinden, weil eben der Knopf A nicht auf Position B liegt sondern auf Position C und der Code nicht die Fancy Lambdas aus .NET 3.5 nutzt. Zählt mal alleine die Anzahl an ORM Frameworks die es draußen im Markt und vor allem im Open Source Bereich gibt, so weiß man gar nicht so recht welche man alle Testen soll. Alle haben Vor- und Nachteile, doch überwiegen bei allen die Nachteile so stark das man gleich selbst eines schreiben muß? &lt;/p&gt;  &lt;p&gt;Meinem eigentlichen Ziel, ein Blog auf einem eigenen Server zu hosten und dort Teile anpassbar zu haben bin ich zumindest ein bißchen näher gekommen (ca. 1%). Wahrscheinlich werde ich die BlogEngine.NET dazu nehmen, aber vielleicht überkommt es mich ja noch und ich störe mich auch nicht an PHP dann wäre Wordpress wohl die Wahl.&lt;/p&gt;  &lt;p&gt;Eine eigene Engine schreiben? Nochmals nein, der Teufel steckt nachher im Detail. Es sei denn es gäbe ein Framework das mir lediglich die Grundkomponenten zur Verfügung stellt. RSS/ATOM Feed Rendering, Ping- und Trackback Services oder ein Domain Modell dass sich lediglich auf die Pflichtattribute von Feeds begrenzt und alles andere optional hinzufügen lassen würde. Ein kleines, übersichtliches Framework, das könnte man als Basis nimmt und wirklich nur das notwendigste zur Verfügung stellt. Damit man die rudimentären Dinge nicht nochmals schreiben müsste. Dann, dann vielleicht.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9889923" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding4Fun/default.aspx">Coding4Fun</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>TechTalk Dezember 2009: Anwendungsentwicklung mit Visual Studio 2010</title><link>http://blogs.msdn.com/dparys/archive/2009/07/31/techtalk-dezember-2009-anwendungsentwicklung-mit-visual-studio-2010.aspx</link><pubDate>Fri, 31 Jul 2009 12:05:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9854259</guid><dc:creator>dparys</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9854259.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9854259</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9854259</wfw:comment><description>&lt;p&gt;Erst im Juni habe ich einen TechTalk hinter mir und schon steht mein nächster an. Dieses mal jedoch nicht über einen Monat gezogen sondern in einer Woche werden 5 Städte besucht und mein Kollege &lt;a href="http://blogs.msdn.com/cbinder"&gt;Christian Binder&lt;/a&gt; wird auch mit von der Partie sein.&lt;/p&gt;  &lt;p&gt;In Visual Studio 2010 kommen so viele neue Elemente dazu das wir einfach in &lt;a href="http://www.microsoft.com/germany/msdn/techtalk/aktuell/default.mspx"&gt;diesem TechTalk&lt;/a&gt; verschiedene Aspekte live im Coding demonstrieren wollen und auf hoffentlich viele Fragen eingehen dürfen. Ganz nach dem Motto: “Keine Slides! Nur Code!”&lt;/p&gt;  &lt;p&gt;Hier der Auszug von der MSDN TechTalk Anmeldeseite:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Der letzte MSDN TechTalk in diesem Jahr nimmt Sie mit auf eine Reise zur nächsten Version von Visual Studio: Visual Studio 2010. Dabei werden Christian Binder und Dariusz Parys die interessantesten Aspekte der neuen Entwicklungsumgebung vorstellen: von Verbesserungen in den einzelnen Frameworks bis hin zu neuen Möglichkeiten in den Application Lifecycle Management Tools, die das Testen und die Entwicklung im Team einfacher machen, wird dieser TechTalk die verschiedenen Aspekte mit Hilfe von Live Codings demonstrieren. Das heißt ganz klar: Keine Slides! Nur Code!&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;h4&gt;Die Termine:&lt;/h4&gt; &lt;/blockquote&gt;  &lt;ul&gt;   &lt;ul&gt;     &lt;li&gt;&lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032422667&amp;amp;Culture=de-DE"&gt;30.11. Karlsruhe&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032422668&amp;amp;Culture=de-DE"&gt;01.12. Köln&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032422669&amp;amp;Culture=de-DE"&gt;02.12. Hamburg&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032422671&amp;amp;Culture=de-DE"&gt;03.12. Berlin&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032422672&amp;amp;Culture=de-DE"&gt;04.12. München&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;An manchen Terminen werden wir vermutlich deutlich überziehen, das dürfte Karlsruhe, Berlin und München sein. In Köln und Hamburg sind wir leider an die Öffnungszeiten des Microsoft Office gebunden.&lt;/p&gt;  &lt;p&gt;Ich freue mich schon auf viele Teilnehmer und Fragen, bis dann!&lt;/p&gt;  &lt;p&gt;Link: &lt;a href="http://www.microsoft.com/germany/msdn/techtalk/aktuell/default.mspx"&gt;Offizielle TechTalk Anmeldeseite&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9854259" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/Connected+Systems/default.aspx">Connected Systems</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/dparys/archive/tags/C_2B002B002F00_CLI/default.aspx">C++/CLI</category><category domain="http://blogs.msdn.com/dparys/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/dparys/archive/tags/WF/default.aspx">WF</category><category domain="http://blogs.msdn.com/dparys/archive/tags/VSTS_2F00_TFS/default.aspx">VSTS/TFS</category><category domain="http://blogs.msdn.com/dparys/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding4Fun/default.aspx">Coding4Fun</category><category domain="http://blogs.msdn.com/dparys/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/dparys/archive/tags/MSDN/default.aspx">MSDN</category><category domain="http://blogs.msdn.com/dparys/archive/tags/VSTS/default.aspx">VSTS</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Events/default.aspx">Events</category><category domain="http://blogs.msdn.com/dparys/archive/tags/TechTalk/default.aspx">TechTalk</category><category domain="http://blogs.msdn.com/dparys/archive/tags/.NET+Framework/default.aspx">.NET Framework</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Testing/default.aspx">Testing</category><category domain="http://blogs.msdn.com/dparys/archive/tags/PLINQ/default.aspx">PLINQ</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://blogs.msdn.com/dparys/archive/tags/C_2B002B00_/default.aspx">C++</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Services/default.aspx">Services</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Dynamic+Languages/default.aspx">Dynamic Languages</category><category domain="http://blogs.msdn.com/dparys/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Parallel+Computing/default.aspx">Parallel Computing</category><category domain="http://blogs.msdn.com/dparys/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category></item><item><title>Community: Stefan Lieser &amp;#252;ber Clean Code Developer</title><link>http://blogs.msdn.com/dparys/archive/2009/07/28/community-stefan-lieser-ber-clean-code-developer.aspx</link><pubDate>Tue, 28 Jul 2009 08:38:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9850643</guid><dc:creator>dparys</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9850643.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9850643</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9850643</wfw:comment><description>&lt;p&gt;Auf dem &lt;a href="http://ulm.netopenspace.de/2009"&gt;.NET Open Space S&amp;#252;d 2009&lt;/a&gt; in Ulm hatte ich die Gelegenheit &lt;a href="http://www.lieser-online.de/blog/"&gt;Stefan Lieser&lt;/a&gt; kennenzulernen. Stefan und &lt;a href="http://ralfw.blogspot.com/"&gt;Ralf Westphal&lt;/a&gt; haben die &lt;a href="http://www.clean-code-developer.de"&gt;Clean Code Developer&lt;/a&gt; Initiative ins Leben gerufen. Ich wollte von Stefan genauer wissen was es damit auf sich hat und habe ihn einfach vor die Kamera gezerrt und ihn befragt. Warum Stefan zwei Armb&amp;#228;nder tr&amp;#228;gt und &amp;#252;berhaupt Armb&amp;#228;nder tr&amp;#228;gt, das erkl&amp;#228;rt er auch im Interview. Viel Spa&amp;#223; beim reinschauen!&lt;/p&gt; &lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="320" height="240"&gt; &lt;param name="source" value="http://channel9.msdn.com/App_Themes/default/vp09_06_22.xap" /&gt; &lt;param name="initParams" value="m=mms://mschnlnine.wmod.llnwd.net/a1809/d1/ch9/2/9/0/1/8/4/dpccdstefanlieser_s_ch9.wmv,autostart=false,autohide=true,showembed=true, thumbnail=http://mschnlnine.vo.llnwd.net/d1/ch9/2/9/0/1/8/4/dpccdstefanlieser_large_ch9.png, postid=481092" /&gt; &lt;param name="background" value="#00FFFFFF" /&gt; &lt;a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"&gt; &lt;img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /&gt; &lt;/a&gt; &lt;/object&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9850643" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>Am Anfang war ein Band…</title><link>http://blogs.msdn.com/dparys/archive/2009/06/25/am-anfang-war-ein-band.aspx</link><pubDate>Thu, 25 Jun 2009 10:33:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9803058</guid><dc:creator>dparys</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9803058.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9803058</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9803058</wfw:comment><description>&lt;p&gt;…oder wie alles Anfing. In diesem Video erzählt Bill Gates die Entstehung von ALTAIR BASIC. Ein interessanter Beitrag von &lt;a href="https://blogs.msdn.com/vbteam/"&gt;Lisa Feigenbaum&lt;/a&gt; aus der Reihe &lt;a href="http://channel9.msdn.com/shows/History/"&gt;The History of Microsoft&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="320" height="240"&gt; &lt;param name="source" value="http://channel9.msdn.com/App_Themes/default/vp09_06_22.xap" /&gt; &lt;param name="initParams" value="m=mms://mschnlnine.wmod.llnwd.net/a1809/d1/ch9/8/1/3/5/5/4/HistoryofMicrosoftFinalNHDMusic_s_ch9.wmv,autostart=false,autohide=true,showembed=true, thumbnail=http://mschnlnine.vo.llnwd.net/d1/ch9/8/1/3/5/5/4/HistoryMicrosoft1975HDMusicbed_large_ch9.jpg, postid=455318" /&gt; &lt;param name="background" value="#00FFFFFF" /&gt; &lt;a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"&gt; &lt;img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /&gt; &lt;/a&gt; &lt;/object&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9803058" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/Dies+und+Das/default.aspx">Dies und Das</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Video/default.aspx">Video</category></item><item><title>C# Lambdas und die Lesbarkeit von Source Code</title><link>http://blogs.msdn.com/dparys/archive/2009/06/16/c-lambdas-und-die-lesbarkeit-von-source-code.aspx</link><pubDate>Tue, 16 Jun 2009 09:43:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9759238</guid><dc:creator>dparys</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9759238.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9759238</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9759238</wfw:comment><description>&lt;p&gt;Auf dem heutigen TechTalk in Köln zum Thema Parallel Computing ist eine rege Diskussion zum Thema Lambdas in C# entstanden. Beim Vorstellen der .NET Klasse &lt;em&gt;Parallel&lt;/em&gt; aus dem &lt;em&gt;System.Threading&lt;/em&gt; Namespace in .NET 4.0 habe ich neben den einfachen Parallel.Invoke Beispiel auch eine Monte Carlo PI Simulation gezeigt. Dabei wurde die Funktion &lt;em&gt;Parallel.For&amp;lt;T&amp;gt;&lt;/em&gt; benutzt.&lt;/p&gt;  &lt;p&gt;Mit dieser Funktion lassen sich Schleifen parallelisieren und entsprechend die Ergebnisse der einzelnen Tasks zusammenfassen. Zum Beispiel kann man diese For Schleife&lt;/p&gt;  &lt;div&gt;   &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; total = 0;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i = 0; i &amp;lt; 10; i++)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     total += 1;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;folgendermaßen mittels der Klasse &lt;em&gt;Parallel&lt;/em&gt; auf mehrere Prozessorkerne verteilen:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; Parallel.For&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;(0, 10, () =&amp;gt; 0, (i, pls, subtotal) =&amp;gt;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;         subtotal += 1;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; subtotal;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     },&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;     (x) =&amp;gt; { Interlocked.Add(&lt;span style="color: #0000ff"&gt;ref&lt;/span&gt; total, x); });&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;blockquote&gt;
  &lt;p&gt;(Hinweis: Das ist nur ein Beispiel und ist den Aufwand nicht wert parallel verarbeitet zu werden!)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Nun ist der parallelisierte Code nicht so leicht lesbar. Was für hitzige Diskussionen sorgte. Ich habe auch ein wenig provoziert und auch darauf hingewiesen das der Code nicht unbedingt gleich zu verstehen ist. Was passiert da eigentlich?&lt;/p&gt;

&lt;p&gt;Die &lt;em&gt;Parallel.For&amp;lt;T&amp;gt;&lt;/em&gt; Methode so wie ich sie oben benutze bekommt 3 Lambda Ausdrücke mit. Einmal die Initialisierung des einzelnen Threads mittels der Funktion &lt;em&gt;() =&amp;gt; 0&lt;/em&gt;. Diese Lambda Schreibweise ist die Abkürzung für &lt;em&gt;Action&lt;/em&gt; ohne Parameter. Der zweite Lambda Ausdruck hat gleich 3 Parameter, einmal die Laufvariable &lt;em&gt;&lt;strong&gt;i&lt;/strong&gt;&lt;/em&gt;, dann eine Variable mit dem Namen &lt;em&gt;&lt;strong&gt;pls &lt;/strong&gt;&lt;/em&gt;und schliesslich die letzte Variable &lt;em&gt;&lt;strong&gt;subtotal&lt;/strong&gt;&lt;/em&gt;. Interessant ist, das man nicht anhand des Codes erkennen kann was diese einzelnen Variablen darstellen. Vielmehr muss man mittels Intellisense oder Dokumentation nachschauen um welche Typen es sich hier genau handelt. &lt;em&gt;&lt;strong&gt;i&lt;/strong&gt;&lt;/em&gt; ist ein &lt;em&gt;int&lt;/em&gt;, &lt;em&gt;&lt;strong&gt;pls&lt;/strong&gt;&lt;/em&gt; ist &lt;em&gt;ParallelLoopState&lt;/em&gt; und &lt;em&gt;&lt;strong&gt;subtotal&lt;/strong&gt;&lt;/em&gt; wieder ein &lt;em&gt;int &lt;/em&gt;und ein Rückgabewert! Letztlich mapped diese Lambda auf die Deklaration &lt;em&gt;Func&amp;lt;int,ParallelLoopState,out int&amp;gt;&lt;/em&gt;. Ist schon gewöhnungsbedürftig. Die dritte Lambda ist schliesslich für die Reduktion zuständig, das Zusammenführen der einzelnen Ausführungspfade zur Gesamtvariable &lt;strong&gt;&lt;em&gt;total&lt;/em&gt;&lt;/strong&gt;. Die Variable &lt;em&gt;&lt;strong&gt;x&lt;/strong&gt;&lt;/em&gt; an dieser Stelle ist der Rückgabewert der zweiten Lamdba &lt;em&gt;&lt;strong&gt;subtotal&lt;/strong&gt;&lt;/em&gt;. Eigentlich recht einfach wenn man weiss wie &lt;em&gt;Paralle.For&amp;lt;T&amp;gt;&lt;/em&gt; implementiert ist. &lt;/p&gt;

&lt;p&gt;Genau hier liegt das Problem. So mächtig Lambda Ausdrücke auch sein mögen, Sie bergen auch viele Risiken. Wenn Klassen Funktionen implementieren die vor lauter &lt;em&gt;Action &lt;/em&gt;und &lt;em&gt;Func &lt;/em&gt;Parameter nur so strotzen, so darf man sicher sein dass Lambdas an dieser Stelle eingesetzt werden. Das wiederrum macht den Code nicht gleich intuitiv lesbar. Beschäftigt man sich gerade mit der API so ist es ein leichtes zu verstehen was die Implementierung bedeutet. Aber wie sieht es aus wenn man sich eine Weile nicht mit dieser API beschäftigt und dann nach 2-3 Monaten mal wieder drauf schaut? Ich wette man muss dann kurz inne halten und sich vielleicht sogar die Dokumentation nochmals lesen. &lt;/p&gt;

&lt;p&gt;Insofern ist der Einwand der zwei Teilnehmer heute irgendwie schon berechtigt, auf der anderen Seite ist eine anderen Lösung womöglich gar nicht so trivial. Natürlich könnte man das ganze auch in einem Fluent Interface Ansatz als API zur Verfügung stellen, vielleicht so,&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; FluentParallel.For&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;     .From(0)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     .To(10)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     .ExecuteLoopBody(&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         (subtotal) =&amp;gt;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;         {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;             subtotal += 1; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; subtotal;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;         })&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;     .Reduce(&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;         (subtotal) =&amp;gt;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;         {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;             Interlocked.Add(&lt;span style="color: #0000ff"&gt;ref&lt;/span&gt; total, subtotal);&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;         })&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;     .Wait();&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;doch wirklich etwas gewonnen hat man hier nicht unbedingt. Die API könnte ein paar allgemeine Annahmen einfach implementieren, trotzdem wird beim Einsatz der Lambdas die Problematik mit den Übergabeparametern nicht gelöst. Man erkennt den Typen nach wie vor nicht und bei komplexeren Loop Bodies wäre damit auch dieser Ansatz nicht unbedingt lesbarer. &lt;/p&gt;

&lt;p&gt;Lambdas bergen Risiken was die Lesbarkeit des Codes angeht und damit Hand in Hand auch dessen Wartbarkeit. Wie seht Ihr den Einsatz von Lambdas?&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9759238" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>Projekt Blog Poll – Entity Framework Revisited und die Folgen bisher</title><link>http://blogs.msdn.com/dparys/archive/2009/06/15/projekt-blog-poll-entity-framework-revisited-und-die-folgen-bisher.aspx</link><pubDate>Mon, 15 Jun 2009 11:23:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9752395</guid><dc:creator>dparys</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9752395.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9752395</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9752395</wfw:comment><description>&lt;p&gt;Das Projekt Blog Poll ist nun wieder beim Entity Framework angekommen. Dieses mal werden die Entitäten auf die eigenen Objekte gemapped. Jetzt werden sich vermutlich einige Leute fragen, warum mappe ich auf eigene Objekte? Dann lässt sich doch das ADO.NET Data Services Framework nicht so einfach nutzen. Bei einem eigenen Objekt Modell muss man zusätzliche Schnittstellen implementieren! Stimmt. Aber ich werde im folgenden Projekt die ADO.NET Data Services auch nicht final benutzen. Ich habe in meinem Test Prototypen ein Problem festgestellt das ich noch nicht so hundertprozentig eingrenzen konnte. Das Problem ist beim Hosten von Silverlight Anwendungen über Cross-Domain Grenzen mit dem Zugriff auf die ADO.NET Data Services. Der Datenzugriff funktioniert in dem Szenario nicht so wie er soll. Insofern werde ich das Repository durch eine WCF Service Schicht kapseln, diese hat kein Probleme mit der Cross-Domain Verteilung der Anwendung. &lt;/p&gt;  &lt;p&gt;Für alle die, die noch nicht so richtig ins Projekt reingeschaut haben, gibt es hier nochmal die komplette Serie verlinkt.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/dparys/archive/2009/05/14/projekt-blog-poll-anforderungen.aspx"&gt;Projekt Blog Poll – Anforderungen (Teil 1)&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/dparys/archive/2009/05/15/projekt-blog-poll-technisches-design.aspx"&gt;Projekt Blog Poll – Technisches Design (Teil 2)&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/dparys/archive/2009/05/20/projekt-blog-poll-datenbankschema.aspx"&gt;Projekt Blog Poll – Datenbankschema (Teil 3)&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/dparys/archive/2009/05/25/projekt-blog-poll-entity-framework-repository.aspx"&gt;Projekt Blog Poll – Entity Framework Repository (Teil 4)&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/dparys/archive/2009/05/27/projekt-blog-poll-domain-model.aspx"&gt;Projekt Blog Poll – Domain Model (Teil 5)&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/dparys/archive/2009/06/08/mein-blog-und-das-projekt-blog-poll-und-widescreen.aspx"&gt;Projekt Blog Poll – Specification (Teil 6)&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/dparys/archive/2009/06/15/projekt-blog-poll-mock-repository.aspx"&gt;Projekt Blog Poll – Mock Repository (Teil 7)&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;So, viel Spaß beim 8. Teil.&lt;/p&gt; &lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="320" height="240"&gt; &lt;param name="source" value="http://channel9.msdn.com/App_Themes/default/vp09_06_09.xap" /&gt; &lt;param name="initParams" value="m=http://mschnlnine.vo.llnwd.net/d1/ch9/4/4/1/6/6/4/pbpteil8_2MB_ch9.wmv,autostart=false,autohide=true,showembed=true, thumbnail=http://mschnlnine.vo.llnwd.net/d1/ch9/4/4/1/6/6/4/pbpteil8_large_ch9.png, postid=466144" /&gt; &lt;param name="background" value="#00FFFFFF" /&gt; &lt;a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"&gt; &lt;img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /&gt; &lt;/a&gt; &lt;/object&gt;  &lt;p&gt;Update: Jetzt müsste das Video auch in besserer Qualität zu sehen sein.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9752395" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding4Fun/default.aspx">Coding4Fun</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>Projekt Blog Poll – Mock Repository</title><link>http://blogs.msdn.com/dparys/archive/2009/06/15/projekt-blog-poll-mock-repository.aspx</link><pubDate>Mon, 15 Jun 2009 11:10:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9752369</guid><dc:creator>dparys</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9752369.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9752369</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9752369</wfw:comment><description>&lt;p&gt;Damit die Tests zusammen mit dem Domänen Modell wieder kompilieren, schreibe ich in dieser Folge ein Mock Repository.&lt;/p&gt; &lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="320" height="240"&gt; &lt;param name="source" value="http://channel9.msdn.com/App_Themes/default/vp09_06_09.xap" /&gt; &lt;param name="initParams" value="m=http://mschnlnine.vo.llnwd.net/d1/ch9/3/4/1/6/6/4/pbpteil7_2MB_ch9.wmv,autostart=false,autohide=true,showembed=true, thumbnail=http://mschnlnine.vo.llnwd.net/d1/ch9/3/4/1/6/6/4/pbpteil7_large_ch9.png, postid=466143" /&gt; &lt;param name="background" value="#00FFFFFF" /&gt; &lt;a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"&gt; &lt;img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /&gt; &lt;/a&gt; &lt;/object&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9752369" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding4Fun/default.aspx">Coding4Fun</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>Projekt Blog Poll – Domain Model</title><link>http://blogs.msdn.com/dparys/archive/2009/05/27/projekt-blog-poll-domain-model.aspx</link><pubDate>Wed, 27 May 2009 18:03:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9644510</guid><dc:creator>dparys</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9644510.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9644510</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9644510</wfw:comment><description>&lt;p&gt;Nach den Erkenntnissen in Teil 4, werden die weiteren Repository Implementierungen vorbereitet. Was hierzu fehlt ist ein Domänen Modell das in diesem 5. Teil seinen Anfang findet.&lt;/p&gt; &lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="320" height="240"&gt; &lt;param name="source" value="http://channel9.msdn.com/App_Themes/default/vp09_04_23.xap" /&gt; &lt;param name="initParams" value="m=http://mschnlnine.vo.llnwd.net/d1/ch9/2/3/8/5/6/4/pbpteil5New_2MB_ch9.wmv,autostart=false,autohide=true,showembed=true, thumbnail=http://mschnlnine.vo.llnwd.net/d1/ch9/2/3/8/5/6/4/pbpteil5New_large_ch9.png, postid=465832" /&gt; &lt;param name="background" value="#00FFFFFF" /&gt; &lt;a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"&gt; &lt;img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /&gt; &lt;/a&gt; &lt;/object&gt;  &lt;p&gt;Viel Spaß beim reinschauen.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9644510" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding4Fun/default.aspx">Coding4Fun</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>Projekt Blog Poll – Entity Framework Repository</title><link>http://blogs.msdn.com/dparys/archive/2009/05/25/projekt-blog-poll-entity-framework-repository.aspx</link><pubDate>Mon, 25 May 2009 11:08:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9640098</guid><dc:creator>dparys</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9640098.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9640098</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9640098</wfw:comment><description>&lt;p&gt;Im 4. Teil der Serie zum Projekt Blog Poll geht es nun in die erste Implementierung. Ein Repository soll erstellt werden. Die erste Technologie die ich benutze ist das Entity Framework. Und wie mit jeder neuen Technologie ist auch bei dieser die ein oder andere Fragestellung zu lösen.&lt;/p&gt; &lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="320" height="240"&gt; &lt;param name="source" value="http://channel9.msdn.com/App_Themes/default/vp09_04_23.xap" /&gt; &lt;param name="initParams" value="m=http://mschnlnine.vo.llnwd.net/d1/ch9/5/5/4/5/6/4/pbpteil4_2MB_ch9.wmv,autostart=false,autohide=true,showembed=true, thumbnail=http://mschnlnine.vo.llnwd.net/d1/ch9/5/5/4/5/6/4/pbpteil4_large_ch9.png, postid=465455" /&gt; &lt;param name="background" value="#00FFFFFF" /&gt; &lt;a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"&gt; &lt;img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /&gt; &lt;/a&gt; &lt;/object&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9640098" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding4Fun/default.aspx">Coding4Fun</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Testing/default.aspx">Testing</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>Projekt Blog Poll – Technisches Design</title><link>http://blogs.msdn.com/dparys/archive/2009/05/15/projekt-blog-poll-technisches-design.aspx</link><pubDate>Fri, 15 May 2009 10:01:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9617941</guid><dc:creator>dparys</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9617941.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9617941</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9617941</wfw:comment><description>&lt;p&gt;Im zweiten Teil versuche ich die Anforderungen technisch Aufzubereiten . Natürlich habe ich mit der ersten Testimplementierung schon so eine Art Marschrichtung im Kopf, doch ich versuche das ganze objektiv zu erörtern. Ob die Entscheidungen die ich hier treffe später auch die richtigen sind wird die Zeit zeigen.&lt;/p&gt;  &lt;p&gt;&lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="320" height="240"&gt; &lt;param name="source" value="http://channel9.msdn.com/App_Themes/default/vp09_04_23.xap" /&gt; &lt;param name="initParams" value="m=http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/5/6/4/pbpteil2_2MB_ch9.wmv,autostart=false,autohide=true,showembed=true, thumbnail=http://mschnlnine.vo.llnwd.net/d1/ch9/1/2/3/5/6/4/pbpteil2_large_ch9.png, postid=465321" /&gt; &lt;param name="background" value="#00FFFFFF" /&gt; &lt;a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"&gt; &lt;img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /&gt; &lt;/a&gt; &lt;/object&gt;&lt;/p&gt;  &lt;p&gt;Der Ton ist in diesem und im nächsten Teil noch nicht so toll, ab dem 4. ist es deutlich besser. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9617941" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding4Fun/default.aspx">Coding4Fun</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>Projekt Blog Poll – Anforderungen</title><link>http://blogs.msdn.com/dparys/archive/2009/05/14/projekt-blog-poll-anforderungen.aspx</link><pubDate>Thu, 14 May 2009 10:48:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9614989</guid><dc:creator>dparys</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9614989.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9614989</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9614989</wfw:comment><description>&lt;p&gt;Vor längerer Zeit habe ich die &lt;a href="http://blogs.msdn.com/dparys/archive/2009/02/23/blog-poll-mit-silverlight-2.aspx"&gt;Frage gestellt&lt;/a&gt; ob der FC Bayern München noch Deutscher Meister werden kann. Die Umfrage ist mit einer Silverlight 2 Anwendung erstellt worden. Die Anwendung habe ich nun als Grundlage genommen um eine Screencast Serie auf Channel 9 zu publizieren. Das ganze heißt Projekt: Blog Poll und zeigt wie die Anwendung entwickelt wird. &lt;/p&gt; &lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="320" height="240"&gt; &lt;param name="source" value="http://channel9.msdn.com/App_Themes/default/vp09_04_23.xap" /&gt; &lt;param name="initParams" value="m=http://mschnlnine.vo.llnwd.net/d1/ch9/7/0/5/4/6/4/pbpteil1_2MB_ch9.wmv,autostart=false,autohide=true,showembed=true, thumbnail=http://mschnlnine.vo.llnwd.net/d1/ch9/7/0/5/4/6/4/pbpteil1_large_ch9.png, postid=464507" /&gt; &lt;param name="background" value="#00FFFFFF" /&gt; &lt;a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"&gt; &lt;img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /&gt; &lt;/a&gt; &lt;/object&gt;  &lt;p&gt;Viel Spaß beim reinschauen.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9614989" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding4Fun/default.aspx">Coding4Fun</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>Wer PEX mag, wird Code Contracts lieben!</title><link>http://blogs.msdn.com/dparys/archive/2009/02/24/wer-pex-mag-wird-code-contracts-lieben.aspx</link><pubDate>Tue, 24 Feb 2009 08:30:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9442210</guid><dc:creator>dparys</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9442210.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9442210</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9442210</wfw:comment><description>&lt;p&gt;Auf &lt;a href="http://msdn.microsoft.com/en-us/devlabs/default.aspx"&gt;Microsoft DevLabs&lt;/a&gt; ist ein weiterer Baustein zum Thema Code Qualität erschienen: Code Contracts. Ein Projekt das von Microsoft Research entwickelt wurde, findet so langsam seinen Weg in den Produktionsalltag.&lt;/p&gt;  &lt;p&gt;Was kann man mit Code Contracts machen? Man definiert notwendige Bedingungen für die Anwendung einer beliebigen API Schnittstelle im Code, z.B.&lt;/p&gt;  &lt;div&gt;   &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; Function( &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; parameter )&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     Contract.Requires( parameter &amp;gt; 0 );&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #008000"&gt;// ...&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Neben der Möglichkeit zur Laufzeit Prüfungen einzubauen, kann man auch statische Prüfungen durchführen und somit auch zur Compile-Zeit wichtige Hinweise auf mögliche Probleme erhalten. Code Contracts bietet für PEX eine sehr gute Hilfe Tests noch effizienter zu erstellen.&lt;/p&gt;

&lt;p&gt;Auf der Webseite gibt es unten rechts noch ein nettes Einführungsvideo.&lt;/p&gt;

&lt;p&gt;Link: &lt;a href="http://msdn.microsoft.com/en-us/devlabs/dd491992.aspx"&gt;Microsoft DevLabs Code Contracts&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9442210" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>Coding 4 Fun: Slide Tweet 0.1</title><link>http://blogs.msdn.com/dparys/archive/2009/02/10/coding-4-fun-slide-tweet-0-1.aspx</link><pubDate>Tue, 10 Feb 2009 17:24:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9410626</guid><dc:creator>dparys</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9410626.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9410626</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9410626</wfw:comment><description>&lt;p&gt;What is Slide Tweet? A Powerpoint Add-In twittering slide titles. If you are not familiar with &lt;a href="http://twitter.com"&gt;http://twitter.com&lt;/a&gt; I suggest to read the post &lt;a href="http://www.hanselman.com/blog/HowToTwitterFirstStepsAndATwitterGlossary.aspx"&gt;“How to Twitter – First Steps and a Twitter Glossary”&lt;/a&gt; from &lt;a href="http://www.hanselman.com"&gt;Scott Hanselman&lt;/a&gt;. Why do I want to have an add-in for powerpoint twittering slide titles? Well, I had an idea and I will test it in the next talk I give. The idea is simpel to integrate the audience through Twitter while presenting content. &lt;/p&gt;  &lt;p&gt;People can follow the tag specified in the beginning of the presentation and make comments, retweet or discuss the slide topic presented currently. Maybe I will use this to answer questions coming through twitter during the presentation, I’m not sure yet.&lt;/p&gt;  &lt;p&gt;Here are some screenshots how this works. First you load any powerpoint you want to present and start the presentation. After this you will be asked if you want to twitter this deck.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/dparys/WindowsLiveWriter/Coding4FunSlideTweet0.1_D87C/shot1_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="shot1" border="0" alt="shot1" src="http://blogs.msdn.com/blogfiles/dparys/WindowsLiveWriter/Coding4FunSlideTweet0.1_D87C/shot1_thumb.png" width="548" height="384" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After specifying credentials and the tag to use for the tweets, you are ready to go. During presentation slide titles will be twittered with the specified tag. The audience is able to follow this tag. Let’s assume we have a tag which is called &lt;a href="http://search.twitter.com/search?q=#gac09"&gt;#gac09&lt;/a&gt;. You can basically follow this tag using the &lt;a href="http://search.twitter.com/"&gt;twitter search&lt;/a&gt; functionality or any other twitter client able to search for tags.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/dparys/WindowsLiveWriter/Coding4FunSlideTweet0.1_D87C/shot4_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="shot4" border="0" alt="shot4" src="http://blogs.msdn.com/blogfiles/dparys/WindowsLiveWriter/Coding4FunSlideTweet0.1_D87C/shot4_thumb.png" width="535" height="372" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The results will be shown and refreshed if new content for this tag is available.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/dparys/WindowsLiveWriter/Coding4FunSlideTweet0.1_D87C/shot5_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="shot5" border="0" alt="shot5" src="http://blogs.msdn.com/blogfiles/dparys/WindowsLiveWriter/Coding4FunSlideTweet0.1_D87C/shot5_thumb.png" width="551" height="566" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You will see all tweets using the tag and not only the tweets by your presentation but also any tweets using the tag, replying on your tweets. &lt;/p&gt;  &lt;p&gt;The audience could interact among each other and give also feedback via Twitter (at least this is the idea I had). That said, it makes sense to specify one or multiple tags to make the presentation unique (please no UUID).&lt;/p&gt;  &lt;p&gt;I will see how it works on my next talk.&lt;/p&gt;  &lt;p&gt;If you are a presenter and would like to try out this add-in you can. I have posted a resource page on my code gallery with the solution file: &lt;a href="http://code.msdn.microsoft.com/slidetweet"&gt;Slide Tweet&lt;/a&gt;. Please note that you need Visual Studio 2008 and Visual Studio Tools for Office and Powerpoint 2007 to run this sample. I have no really good setup so far, neither good error handling. Therefore enjoy with care.&lt;/p&gt;  &lt;p&gt;One design decision I made. I always call to Twitter asynchronously with one exception. The last slide is posted synchronously, just to ensure that every call was made (so I even don’t utilize the callbacks).&lt;/p&gt;  &lt;p&gt;Have fun and feedback welcome!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9410626" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Fun+Stuff/default.aspx">Fun Stuff</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding4Fun/default.aspx">Coding4Fun</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Conference/default.aspx">Conference</category><category domain="http://blogs.msdn.com/dparys/archive/tags/English+Posts/default.aspx">English Posts</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Services/default.aspx">Services</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item><item><title>Clean Code – Mein Versuch daran zu arbeiten</title><link>http://blogs.msdn.com/dparys/archive/2009/01/20/clean-code-mein-versuch-daran-zu-arbeiten.aspx</link><pubDate>Tue, 20 Jan 2009 11:57:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9344560</guid><dc:creator>dparys</dc:creator><slash:comments>19</slash:comments><comments>http://blogs.msdn.com/dparys/comments/9344560.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dparys/commentrss.aspx?PostID=9344560</wfw:commentRss><wfw:comment>http://blogs.msdn.com/dparys/rsscomments.aspx?PostID=9344560</wfw:comment><description>&lt;p&gt;Ich finde die Idee vom &lt;a href="http://www.clean-code-developer.de"&gt;Clean Code Developer&lt;/a&gt; Schick. Wer möchte schliesslich nicht in seinem tun besser werden? Ich habe angefangen mich mit dem &lt;a href="http://www.amazon.de/exec/obidos/ASIN/0132350882/0132350882"&gt;Buch Clean Code&lt;/a&gt; zu beschäftigen. Heute beim weiter arbeiten an meinem Code habe ich folgende Funktion entdeckt:&lt;/p&gt;  &lt;div&gt;   &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;     &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; ProxyIsValid()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; (proxy != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; proxy.State == CommunicationState.Opened) ? &lt;span style="color: #0000ff"&gt;true&lt;/span&gt; : &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Eine kurze Funktion die Aussagekräftig genug ist, oder? Doch irgendwie stört mich etwas daran. &lt;/p&gt;

&lt;p&gt;Ich fange mal mit dem Namen an. &lt;em&gt;ProxyIsValid()&lt;/em&gt;. Vielleicht sollte ich es lieber &lt;em&gt;IsProxyValid()&lt;/em&gt; nennen? Schliesslich prüfe ich bevor ich auf den Proxy zugreife ob ich es tun kann. Doch was macht die Funktion.&lt;/p&gt;

&lt;p&gt;Zum einen prüft sie ob die Instanz nicht null ist und dann prüft sie noch ob die Instanz einen Kommunikationskanal geöffnet hat. Sind eigentlich zwei Prüfungen, der Name &lt;em&gt;IsProxyValid()&lt;/em&gt; ist zwar nich generell falsch doch viel zu generisch. Ich benenne die Funktion um in &lt;em&gt;IsProxyValidAndOpen()&lt;/em&gt;. Anbei der Code der momentanen Funktion und ein Aufruf der Funktion aus einer anderen heraus:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; NotifyTicketAvailable(Ticket ticket)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (IsProxyValidAndOpen())&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         proxy.NewTicketAvailable(&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NewTicketAvailableRequest { Ticket = ticket });&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyValidAndOpen()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; (proxy != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; proxy.State == CommunicationState.Opened) &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;         ? &lt;span style="color: #0000ff"&gt;true&lt;/span&gt; : &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Doch irgendwie stören mich noch die direkten Abfragen auf die Instanz und die Eigenschaft. Sollte man statt &lt;em&gt;proxy != null&lt;/em&gt; eine Funktion implementieren? Sollte man &lt;em&gt;proxy.State == CommunicationState.Opened&lt;/em&gt; kapseln? Ich mache es einfach mal und schaue mir dann das Ergebnis im Code an:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; NotifyTicketAvailable(Ticket ticket)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (IsProxyValidAndOpen())&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         proxy.NewTicketAvailable(&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NewTicketAvailableRequest { Ticket = ticket });&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyValidAndOpen()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; (IsProxyValid() &amp;amp;&amp;amp; IsProxyOpen()) &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;         ? &lt;span style="color: #0000ff"&gt;true&lt;/span&gt; : &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyOpen()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; proxy.State == CommunicationState.Opened;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyValid()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; proxy != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  24:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Liest sich zumindest gut. Doch ist es richtig? Irgendwie hat sich ein neuer Fehler eingeschlichen. Ich habe, muss ich gestehen, keine Unit Tests für meinen Code. Ich kann die Änderungen jetzt nicht validieren. Da ist noch ein großes TODO das an mich selbst geht. Schreibe Unit Tests, schreibe Unit Tests, schreibe Unit Tests. Doch den Fehler sieht man bestimmt. Jemand könnte die Methode &lt;em&gt;IsProxyOpen()&lt;/em&gt; aufrufen ohne das es eine Instanz Proxy gibt. Also wieder refactoring, ich schreibe die Methode &lt;em&gt;IsProxyOpen()&lt;/em&gt; um:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyOpen()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; IsProxyValid() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;         ? proxy.State == CommunicationState.Opened : &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Hmmm… Ich drehe mich im Kreis scheint mir. Ist nun die Namensgebung &lt;em&gt;IsProxyOpen()&lt;/em&gt; noch korrekt? Ich sage jetzt einfach mal ja. Also passe ich noch die Methode &lt;em&gt;IsProxyValidAndOpen()&lt;/em&gt; an:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyValidAndOpen()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; IsProxyOpen();&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Haleluja. Ne, doch nicht. Jetzt scheint es irgendwie auszuarten. Ich habe eine Funktion die heißt &lt;em&gt;IsProxyValidAndOpen()&lt;/em&gt; und die gibt einfach den Return-Wert von &lt;em&gt;IsProxyOpen()&lt;/em&gt; zurück. Das ist so nicht im Sinne des Erfinders, noch ist es lesbar, noch wartbar. &lt;/p&gt;

&lt;p&gt;Wo liegt denn das Problem. Ich habe es. Die Namensgebung ist doch das Problem. Mein Denken darüber vor dem Umschreiben der Methode war bereits im Bilde, ich habe mich gewehrt, doch nun sehe ich es bildlich vorm Auge. Die Namen sind Crap!&lt;/p&gt;

&lt;p&gt;Welchen Namen wähle ich nun, ich denke ich schaue mir nochmal alle momentanen Funktionen auf einmal an:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; NotifyTicketAvailable(Ticket ticket)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (IsProxyValidAndOpen())&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         proxy.NewTicketAvailable(&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NewTicketAvailableRequest { Ticket = ticket });&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyValidAndOpen()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; IsProxyOpen();&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyOpen()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; IsProxyValid() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;         ? proxy.State == CommunicationState.Opened : &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyValid()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; proxy != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  24:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Da, Zeile 21! Sollte nicht &lt;em&gt;IsProxyValid()&lt;/em&gt; in &lt;em&gt;IsProxyValidInstance()&lt;/em&gt; oder so umbenannt werden? Und &lt;em&gt;IsProxyValidAndOpen()&lt;/em&gt; in &lt;em&gt;IsProxyReadyForCommunication()&lt;/em&gt;? Bin mir nicht sicher. Ich sollte konsistent bleiben. Als nicht Ready und Valid mit ein und der selben Bedeutung ausstatten. Ich würde gerne meine ursprüngliche Bezeichnung &lt;em&gt;IsProxyValid()&lt;/em&gt; für einen gültigen, voll initialisierten Proxy benutzen, der sofort zum kommunizieren genutzt werden kann. Dann würde ich &lt;em&gt;IsProxyValid()&lt;/em&gt; einfach in &lt;em&gt;IsProxyInstance()&lt;/em&gt; umbenennen.&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; NotifyTicketAvailable(Ticket ticket)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (IsProxyValid())&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         proxy.NewTicketAvailable(&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NewTicketAvailableRequest { Ticket = ticket });&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyValid()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; IsProxyOpen();&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyOpen()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; IsProxyInstance() &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;         ? proxy.State == CommunicationState.Opened : &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  21:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsProxyInstance()&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  22:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  23:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; proxy != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;  24:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Bin ich jetzt glücklich. Nein, jetzt erkenne ich das die Prüfung des Proxies gar nicht die Aufgabe dieser Klasse ist, sondern mir der Proxy einfach eine Funktion zur Verfügung stellen sollte. In etwa so:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; NotifyTicketAvailable(Ticket ticket)&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (proxy.IsValid())&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         proxy.NewTicketAvailable(&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NewTicketAvailableRequest { Ticket = ticket });&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;
Was meint Ihr? Hat sich der Aufwand gelohnt?&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9344560" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dparys/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/dparys/archive/tags/Coding/default.aspx">Coding</category></item></channel></rss>