<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Biggle&#039;s Blog &#187; .NET</title>
	<atom:link href="http://www.biggle.de/blog/tag/net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.biggle.de/blog</link>
	<description>Web- und Software Development</description>
	<lastBuildDate>Sat, 31 Jul 2010 14:59:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Dotnet-Kick Button in WordPress einbinden II</title>
		<link>http://www.biggle.de/blog/dotnet-kick-button-in-wordpress-einbinden-ii</link>
		<comments>http://www.biggle.de/blog/dotnet-kick-button-in-wordpress-einbinden-ii#comments</comments>
		<pubDate>Sat, 13 Feb 2010 09:29:35 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tipps]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=3870</guid>
		<description><![CDATA[Stefan Lieser hat zwar schon einmal ein CodeSnippet veröffentlicht, wie man den Dotnet-Kick Button in einem WordPress Blog einbindet, ich hab dieses kleine Snippet aber noch ein bisschen &#8220;verfeinert&#8221; : ) Es wird nun nicht nur der Link und der Titel des Artikels zu dotnet-kicks mit übertragen, sondern auch ein Teil vom Content, welcher im [...]]]></description>
			<content:encoded><![CDATA[<p>Stefan Lieser hat zwar schon einmal ein CodeSnippet <a href="http://www.lieser-online.de/blog/?p=161">veröffentlicht</a>, wie man den Dotnet-Kick Button in einem WordPress Blog einbindet, ich hab dieses kleine Snippet aber noch ein bisschen &#8220;verfeinert&#8221; : ) </p>
<p>Es wird nun nicht nur der Link und der Titel des Artikels zu <a href="http://dotnet-kicks.de/">dotnet-kicks</a> mit übertragen, sondern auch ein Teil vom Content, welcher im Beschreibungsfeld mit vorausgefüllt wird.</p>
<p>Hier kannst Du auch die Anzahl der Zeichen, die von Deinem Content abgeschnitten werden sollen mit angeben (atm im Code 160). Nun einfach nur noch die Kategorie auf dotnet-kick anwählen und speichern.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;a href=&quot;http://dotnet-kicks.de/kick/?url=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;title=<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;description=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$string</span> <span style="color: #339933;">=</span> get_the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$newString</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">160</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$newString</span><span style="color: #339933;">.=</span> <span style="color: #0000ff;">' ...'</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$newString</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&quot;http://dotnet-kicks.de/Services/Images/KickItImageGenerator.ashx?url=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;Kick it on dotnet-kicks.de&quot; /&gt;&lt;/a&gt;</pre></td></tr></table></div>

<p>Wenn Du den Content nicht abschneiden möchtest, dann benutzt du einfach folgenden Code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;a href=&quot;http://dotnet-kicks.de/kick/?url=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;title=<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;description=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$string</span> <span style="color: #339933;">=</span> get_the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&quot;http://dotnet-kicks.de/Services/Images/KickItImageGenerator.ashx?url=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;Kick it on dotnet-kicks.de&quot; /&gt;&lt;/a&gt;</pre></td></tr></table></div>

<p>Ich glaub sogar, dass <a href="http://blog.jan-welker.de/">Jan Welker</a> (Mitinitiator von dotnet-kicks) ein Truncate in der Artikelansicht mit eingebaut hat, also sollte normal das untere Snippet ausreichen&#8230;</p>
<p>Wie auch immer, viel Spass damit</p>
<p>Ich bin auch mal so frech und &#8220;kick&#8221; mich gleich mal selbst :D</p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de">Mario Priebe</a>.</p><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>23. April 2010 -- <a href="http://www.biggle.de/blog/facebook-like-button-im-blog-einbinden" title="Facebook Like Button im Blog einbinden">Facebook Like Button im Blog einbinden</a></li><li>25. Januar 2010 -- <a href="http://www.biggle.de/blog/entity-framework-model-updaten" title="Entity Framework Model updaten &#8230;">Entity Framework Model updaten &#8230;</a></li><li>22. Januar 2010 -- <a href="http://www.biggle.de/blog/praktische-muster-commands" title="Praktische Muster &#8211; Commands">Praktische Muster &#8211; Commands</a></li><li>17. Januar 2010 -- <a href="http://www.biggle.de/blog/attribute-mittels-reflektion-abfragen" title="Attribute mittels Reflektion abfragen">Attribute mittels Reflektion abfragen</a></li><li>7. Januar 2010 -- <a href="http://www.biggle.de/blog/nunit-geschickt-einbinden" title="NUnit geschickt einbinden">NUnit geschickt einbinden</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/dotnet-kick-button-in-wordpress-einbinden-ii/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entity Framework Model updaten &#8230;</title>
		<link>http://www.biggle.de/blog/entity-framework-model-updaten</link>
		<comments>http://www.biggle.de/blog/entity-framework-model-updaten#comments</comments>
		<pubDate>Mon, 25 Jan 2010 20:59:29 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Empfehlungen]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[EntityFramework]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=3640</guid>
		<description><![CDATA[&#8230; bringt meiner Meinung nach garnix*, das Model lieber gleich neu erstellen, das erspart ne Menge Frust und Ärger &#8230; ob EF4.0 etwas verlässlicher ist ? * jedenfalls wenn man den Datentyp oder einen Spaltennamen ändert Dieser Beitrag stammt von Mario Priebe.Ähnliche Beiträge23. Juni 2010 -- Stored Procedure mit skalaren Rückgabewert im Entity Framework13. Februar [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230; bringt meiner Meinung nach garnix*, das Model lieber gleich neu erstellen, das erspart ne Menge Frust und Ärger &#8230; ob EF4.0 etwas verlässlicher ist ?</p>
<p><a href="http://www.biggle.de/blog/wp-content/uploads/2010/01/ef.jpg"><img class="alignnone size-full wp-image-3732" title="ef" src="http://www.biggle.de/blog/wp-content/uploads/2010/01/ef.jpg" alt="" width="500" /></a></p>
<p><br class="spacer_" /></p>
<p>* jedenfalls wenn man den Datentyp oder einen Spaltennamen ändert</p>
<p><br class="spacer_" /></p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de">Mario Priebe</a>.</p><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>23. Juni 2010 -- <a href="http://www.biggle.de/blog/stored-procedure-mit-scalaren-ruckgabewert-im-entity-framework" title="Stored Procedure mit skalaren Rückgabewert im Entity Framework">Stored Procedure mit skalaren Rückgabewert im Entity Framework</a></li><li>13. Februar 2010 -- <a href="http://www.biggle.de/blog/dotnet-kick-button-in-wordpress-einbinden-ii" title="Dotnet-Kick Button in Wordpress einbinden II">Dotnet-Kick Button in Wordpress einbinden II</a></li><li>22. Januar 2010 -- <a href="http://www.biggle.de/blog/praktische-muster-commands" title="Praktische Muster &#8211; Commands">Praktische Muster &#8211; Commands</a></li><li>17. Januar 2010 -- <a href="http://www.biggle.de/blog/attribute-mittels-reflektion-abfragen" title="Attribute mittels Reflektion abfragen">Attribute mittels Reflektion abfragen</a></li><li>7. Januar 2010 -- <a href="http://www.biggle.de/blog/nunit-geschickt-einbinden" title="NUnit geschickt einbinden">NUnit geschickt einbinden</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/entity-framework-model-updaten/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Praktische Muster &#8211; Commands</title>
		<link>http://www.biggle.de/blog/praktische-muster-commands</link>
		<comments>http://www.biggle.de/blog/praktische-muster-commands#comments</comments>
		<pubDate>Fri, 22 Jan 2010 07:48:01 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Interfaces]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=3673</guid>
		<description><![CDATA[Ein schönes Beispiel für ein praktisches Entwurfsmuster habe ich im Archiv der dot.net gefunden. In der Ausgabe 1/2009 beschreibt Marc André Zhou mit einem einfachen Beispiel, wie man ein Muster für Commands implementiert. Hierzu definiert er ein Interface ICommand, welches die Methode Execute() festlegt. 1 2 3 4 public interface ICommand &#123; void Execute&#40;&#41;; &#125; [...]]]></description>
			<content:encoded><![CDATA[<p>Ein schönes Beispiel für ein praktisches Entwurfsmuster habe ich im <a href="http://it-republik.de/dotnet/dotnet-magazin-ausgaben/">Archiv der dot.net</a> gefunden.</p>
<p>In der Ausgabe 1/2009 beschreibt Marc André Zhou mit einem einfachen Beispiel, wie man ein Muster für Commands implementiert.</p>
<p>Hierzu definiert er ein Interface ICommand, welches die Methode Execute() festlegt.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">interface</span> ICommand
<span style="color: #009900;">&#123;</span>
    void Execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Die Klassen, die das Interface implementieren, öffnen jeweils eine Applikation</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CMDNotepad <span style="color: #339933;">:</span> ICommand
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> void Execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        Process process <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Process<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        process<span style="color: #339933;">.</span>StartInfo <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ProcessStartInfo<span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #0000ff;">&quot;notepad.exe&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        process<span style="color: #339933;">.</span>Start<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> override string ToString<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;notepad.exe&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Im MainProgramm dann, werden die einzelnen Commands einer Liste vom Typ ICommand hinzugefügt </p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> commands <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> List<span style="color: #339933;">&lt;</span>ICommand<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
commands<span style="color: #339933;">.</span>Add<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> CMDNotepad<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
commands<span style="color: #339933;">.</span>Add<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> CMDIExplorer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
commands<span style="color: #339933;">.</span>Add<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> CMDCalc<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>und anschliessend ausgegeben.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span>ICommand cmd in commands<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    Console<span style="color: #339933;">.</span>WriteLine<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Start command: {0}&quot;</span><span style="color: #339933;">,</span> cmd<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    cmd<span style="color: #339933;">.</span>Execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Ich finde das Beispiel auch als eine sehr gute Erklärung, wie ein Interface arbeitet und an welcher Stelle man eins einsetzen sollte.</p>
<p>Viel Spass beim entwickeln : )</p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de">Mario Priebe</a>.</p><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>17. Januar 2010 -- <a href="http://www.biggle.de/blog/attribute-mittels-reflektion-abfragen" title="Attribute mittels Reflektion abfragen">Attribute mittels Reflektion abfragen</a></li><li>4. Januar 2010 -- <a href="http://www.biggle.de/blog/webservices-auf-erreichbarkeit-pruefen" title="Webservices auf Erreichbarkeit prüfen">Webservices auf Erreichbarkeit prüfen</a></li><li>5. November 2009 -- <a href="http://www.biggle.de/blog/geschwindigkeitsvorteile-mit-vorkompilierten-linq-queries" title="Geschwindigkeitsvorteile mit vorkompilierten LINQ-Queries">Geschwindigkeitsvorteile mit vorkompilierten LINQ-Queries</a></li><li>21. September 2009 -- <a href="http://www.biggle.de/blog/sharpdevelop-3-1-portable" title="SharpDevelop 3.1 Portable">SharpDevelop 3.1 Portable</a></li><li>16. September 2009 -- <a href="http://www.biggle.de/blog/auf-dependencyproperty-reagieren" title="Auf DependencyProperty reagieren">Auf DependencyProperty reagieren</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/praktische-muster-commands/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Attribute mittels Reflektion abfragen</title>
		<link>http://www.biggle.de/blog/attribute-mittels-reflektion-abfragen</link>
		<comments>http://www.biggle.de/blog/attribute-mittels-reflektion-abfragen#comments</comments>
		<pubDate>Sun, 17 Jan 2010 18:40:46 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[VisualBasic]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=3651</guid>
		<description><![CDATA[Man kann mittels Reflektion unter anderem auch Attribute abfragen. Wie man das macht soll das kleine Beispiel mit C# und heute erstmals auch in Visual Basic zeigen: Ich erstelle mir dazu erst einmal ein eigenes Attribut namens BlogAttribute, Basisklasse ist hier Attribute in System C# 1 2 3 4 5 6 7 8 9 10 [...]]]></description>
			<content:encoded><![CDATA[<p>Man kann mittels <a href="http://msdn.microsoft.com/de-de/library/ms173183%28VS.80%29.aspx">Reflektion</a> unter anderem auch Attribute abfragen. Wie man das macht soll das kleine Beispiel mit C# und heute erstmals auch in Visual Basic zeigen:</p>
<p>Ich erstelle mir dazu erst einmal ein eigenes Attribut namens BlogAttribute, Basisklasse ist hier Attribute in System</p>
<p>C#</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> BlogAttribute <span style="color: #339933;">:</span> <span style="color: #990000;">System</span><span style="color: #339933;">.</span>Attribute
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> BlogAttribute<span style="color: #009900;">&#40;</span>string url<span style="color: #339933;">,</span> string name<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        Name <span style="color: #339933;">=</span> name<span style="color: #339933;">;</span>
        Url <span style="color: #339933;">=</span> url<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> string Name <span style="color: #009900;">&#123;</span> get<span style="color: #339933;">;</span> set<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">public</span> string Url <span style="color: #009900;">&#123;</span> get<span style="color: #339933;">;</span> set<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>(VB)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">Public</span> <span style="color: #000000; font-weight: bold;">Class</span> BlogAttribute
	Inherits <span style="color: #990000;">System</span><span style="color: #339933;">.</span>Attribute
	<span style="color: #000000; font-weight: bold;">Public</span> Sub <span style="color: #000000; font-weight: bold;">New</span><span style="color: #009900;">&#40;</span>url__1 <span style="color: #b1b100;">As</span> String<span style="color: #339933;">,</span> name__2 <span style="color: #b1b100;">As</span> String<span style="color: #009900;">&#41;</span>
		Name <span style="color: #339933;">=</span> name__2
		Url <span style="color: #339933;">=</span> url__1
	<span style="color: #990000;">End</span> Sub
&nbsp;
	<span style="color: #000000; font-weight: bold;">Public</span> Property Name<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">As</span> String
		Get
			<span style="color: #b1b100;">Return</span> m_Name
		<span style="color: #990000;">End</span> Get
		Set
			m_Name <span style="color: #339933;">=</span> Value
		<span style="color: #990000;">End</span> Set
	<span style="color: #990000;">End</span> Property
	<span style="color: #000000; font-weight: bold;">Private</span> m_Name <span style="color: #b1b100;">As</span> String
	<span style="color: #000000; font-weight: bold;">Public</span> Property Url<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">As</span> String
		Get
			<span style="color: #b1b100;">Return</span> m_Url
		<span style="color: #990000;">End</span> Get
		Set
			m_Url <span style="color: #339933;">=</span> Value
		<span style="color: #990000;">End</span> Set
	<span style="color: #990000;">End</span> Property
	<span style="color: #000000; font-weight: bold;">Private</span> m_Url <span style="color: #b1b100;">As</span> String
<span style="color: #990000;">End</span> <span style="color: #000000; font-weight: bold;">Class</span></pre></td></tr></table></div>

<p>Und dann setze ich das Attribut über der entsprechenden Klasse: </p>
<p>(C#)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#91;</span>Blog<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://wwww.biggle.de&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Biggle's Blog&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>
<span style="color: #000000; font-weight: bold;">class</span> MyClass
<span style="color: #009900;">&#123;</span><span style="color: #339933;">...</span> <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>(VB)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>Blog<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://wwww.biggle.de&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Biggle's Blog&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span> _
<span style="color: #000000; font-weight: bold;">Class</span> <span style="color: #009900;">&#91;</span>MyClass<span style="color: #009900;">&#93;</span>
<span style="color: #990000;">End</span> <span style="color: #000000; font-weight: bold;">Class</span></pre></td></tr></table></div>

<p>Und nun werden wir das Attribut auslesen und das geht in etwa so:</p>
<p>(C#)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> typeA <span style="color: #339933;">=</span> typeof<span style="color: #009900;">&#40;</span>MyClass<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> List<span style="color: #339933;">&lt;</span>object<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span>typeA<span style="color: #339933;">.</span>GetCustomAttributes<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
o<span style="color: #339933;">.</span><span style="color: #b1b100;">ForEach</span><span style="color: #009900;">&#40;</span>blog <span style="color: #339933;">=&gt;</span>
  <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>blog is BlogAttribute<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
      <span style="color: #000000; font-weight: bold;">var</span> u <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>BlogAttribute<span style="color: #009900;">&#41;</span>blog<span style="color: #339933;">;</span>
      Console<span style="color: #339933;">.</span>WriteLine<span style="color: #009900;">&#40;</span>String<span style="color: #339933;">.</span>Format<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Blog: {0} | Url: {1}&quot;</span><span style="color: #339933;">,</span> u<span style="color: #339933;">.</span>Name<span style="color: #339933;">,</span> u<span style="color: #339933;">.</span>Url<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>(VB)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">Dim typeA <span style="color: #b1b100;">As</span> Type <span style="color: #339933;">=</span> <span style="color: #990000;">GetType</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>MyClass<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
<span style="color: #b1b100;">For</span> <span style="color: #990000;">Each</span> blog <span style="color: #b1b100;">As</span> BlogAttribute In <span style="color: #009900;">&#40;</span>typeA<span style="color: #339933;">.</span>GetCustomAttributes<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">True</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
&nbsp;
    <span style="color: #b1b100;">If</span> TypeOf blog Is BlogAttribute Then
        Console<span style="color: #339933;">.</span>WriteLine<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>String<span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span>Format<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Blog: {0} | Url: {1}&quot;</span><span style="color: #339933;">,</span> blog<span style="color: #339933;">.</span>Name<span style="color: #339933;">,</span> blog<span style="color: #339933;">.</span>Url<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #990000;">End</span> <span style="color: #b1b100;">If</span>
<span style="color: #990000;">Next</span></pre></td></tr></table></div>

<p>Viel Spass beim entwickeln : )</p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de">Mario Priebe</a>.</p><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>22. Januar 2010 -- <a href="http://www.biggle.de/blog/praktische-muster-commands" title="Praktische Muster &#8211; Commands">Praktische Muster &#8211; Commands</a></li><li>4. Januar 2010 -- <a href="http://www.biggle.de/blog/webservices-auf-erreichbarkeit-pruefen" title="Webservices auf Erreichbarkeit prüfen">Webservices auf Erreichbarkeit prüfen</a></li><li>5. November 2009 -- <a href="http://www.biggle.de/blog/geschwindigkeitsvorteile-mit-vorkompilierten-linq-queries" title="Geschwindigkeitsvorteile mit vorkompilierten LINQ-Queries">Geschwindigkeitsvorteile mit vorkompilierten LINQ-Queries</a></li><li>21. September 2009 -- <a href="http://www.biggle.de/blog/sharpdevelop-3-1-portable" title="SharpDevelop 3.1 Portable">SharpDevelop 3.1 Portable</a></li><li>16. September 2009 -- <a href="http://www.biggle.de/blog/auf-dependencyproperty-reagieren" title="Auf DependencyProperty reagieren">Auf DependencyProperty reagieren</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/attribute-mittels-reflektion-abfragen/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NUnit geschickt einbinden</title>
		<link>http://www.biggle.de/blog/nunit-geschickt-einbinden</link>
		<comments>http://www.biggle.de/blog/nunit-geschickt-einbinden#comments</comments>
		<pubDate>Thu, 07 Jan 2010 14:33:45 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[NUnit]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=3630</guid>
		<description><![CDATA[Ich hatte ewig viele Fehler wenn ich in NUnit meine Assembly hinzufügen wollte. Nun, ein Kollege hatte da eine super Idee. Er hatte NUnit einfach als externes Tool in Visual Studio eingebunden und so ist nun möglich, mit einer Tastenkombination, aus der entsprechenden Testklasse heraus, die Assembly direkt in NUnit zu starten und zu testen. [...]]]></description>
			<content:encoded><![CDATA[<p>Ich hatte ewig viele Fehler wenn ich in NUnit meine Assembly hinzufügen wollte. Nun, ein Kollege hatte da eine super Idee. Er hatte NUnit einfach als externes Tool in Visual Studio eingebunden und so ist nun möglich, mit einer Tastenkombination, aus der entsprechenden Testklasse heraus, die Assembly direkt in NUnit zu starten und zu testen.</p>
<p>Man geht dazu in Visual Studio unter Extras/Externe Tools und hier auf Hinzufügen. Folgende Einträge sind dazu notwendig:</p>
<p>Titel: <strong>&amp;yNUnit starten </strong>(y wird das ALT Tastenkürzel)<br />
Befehl: Pfad zur nunit.exe (<strong>C:\Programme\NUnit 2.5.2\bin\net-2.0\nunit.exe</strong>)<br />
Argumente: <strong>$(BinDir)\$(TargetName).dll</strong><br />
Ausgangsverzeichnis: <strong>$(ProjectDir)</strong></p>
<p><a href="http://www.biggle.de/blog/wp-content/uploads/2010/01/NUnit.jpg"><img class="alignnone size-full wp-image-3631" title="NUnit" src="http://www.biggle.de/blog/wp-content/uploads/2010/01/NUnit.jpg" alt="" width="446" height="454" /></a></p>
<p>Wenn man sich nun in der entsprechenden TestKlasse befindet, einfach (vorher kompilieren) ALT X &amp; ALT Y drücken und NUnit sollte sich nun, und das ohne Fehlermeldung : ),  mit dieser Assembly öffnen.</p>
<p><br class="spacer_" /></p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de">Mario Priebe</a>.</p><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>29. Juli 2010 -- <a href="http://www.biggle.de/blog/schriftzeichen-hochstellen-office-quicky" title="Schriftzeichen hochstellen | Office Quicky">Schriftzeichen hochstellen | Office Quicky</a></li><li>26. Juli 2010 -- <a href="http://www.biggle.de/blog/enumeration-im-wcf-service" title="Enumeration im WCF Service">Enumeration im WCF Service</a></li><li>19. Juli 2010 -- <a href="http://www.biggle.de/blog/msi-paket-ohne-installation-entpacken" title="MSI Paket ohne Installation entpacken">MSI Paket ohne Installation entpacken</a></li><li>25. Juni 2010 -- <a href="http://www.biggle.de/blog/entwicklertools-in-microsoft-office-2010-word-aktivieren" title="Entwicklertools in MS Office Word 2010 aktivieren">Entwicklertools in MS Office Word 2010 aktivieren</a></li><li>22. Juni 2010 -- <a href="http://www.biggle.de/blog/elegante-history-in-der-eingabeaufforderung" title="Elegante History in der Eingabeaufforderung">Elegante History in der Eingabeaufforderung</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/nunit-geschickt-einbinden/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
