<?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>Software Entwicklung &#8211; Rene Windegger</title>
	<atom:link href="https://www.windegger.wtf/de/category/software-entwicklung/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.windegger.wtf/de/</link>
	<description>Welcome to Freedom</description>
	<lastBuildDate>Tue, 20 Feb 2024 15:40:32 +0000</lastBuildDate>
	<language>de-DE</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.7.11</generator>
	<item>
		<title>Die Entwirrung der Kunst der C++ Verschleierung: Code-Sicherung in einem kryptischen Web</title>
		<link>https://www.windegger.wtf/de/2024/02/die-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web/?pk_campaign=feed&#038;pk_kwd=die-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web</link>
					<comments>https://www.windegger.wtf/de/2024/02/die-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web/?pk_campaign=feed&#038;pk_kwd=die-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web#respond</comments>
		
		<dc:creator><![CDATA[rene]]></dc:creator>
		<pubDate>Tue, 20 Feb 2024 15:40:28 +0000</pubDate>
				<category><![CDATA[Software Entwicklung]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Obfuscation]]></category>
		<guid isPermaLink="false">https://www.windegger.wtf/?p=4952</guid>

					<description><![CDATA[<p>In der dynamischen Landschaft der Cybersicherheit hat der Schutz von Softwarecode vor neugierigen Blicken höchste Priorität. Die C++ Verschleierung tritt als raffinierte Technik auf, die von Entwicklern verwendet wird, um ihren Quellcode zu verschleiern und es Hackern sowie Reverse-Engineering-Spezialisten zu erschweren, diesen zu verstehen und zu manipulieren. Dieser kryptografische Ansatz</p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2024/02/die-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web/?pk_campaign=feed&#038;pk_kwd=die-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web">Die Entwirrung der Kunst der C++ Verschleierung: Code-Sicherung in einem kryptischen Web</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2024%2F02%2Fdie-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Ddie-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web&amp;action_name=Die+Entwirrung+der+Kunst+der+C%2B%2B+Verschleierung%3A+Code-Sicherung+in+einem+kryptischen+Web&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<img src="" style="float:right;" align="right" />
<p>In der dynamischen Landschaft der Cybersicherheit hat der Schutz von Softwarecode vor neugierigen Blicken höchste Priorität. Die <a href="https://www.antispy.xyz/">C++ Verschleierung</a> tritt als raffinierte Technik auf, die von Entwicklern verwendet wird, um ihren Quellcode zu verschleiern und es Hackern sowie Reverse-Engineering-Spezialisten zu erschweren, diesen zu verstehen und zu manipulieren. Dieser kryptografische Ansatz verwandelt den herkömmlichen C++-Code in ein undurchsichtiges Labyrinth und erhöht so die Gesamtsicherheit von Anwendungen.</p>



<p>Die C++ Verschleierung beinhaltet die gezielte Einführung von Komplexitäten und Redundanzen in den Quellcode, ohne dabei dessen Funktionalität zu beeinträchtigen. Dieser Ansatz zielt darauf ab, Reverse-Engineering-Versuche zu vereiteln und es unbefugten Entitäten außerordentlich schwer zu machen, die ursprüngliche Logik zu entschlüsseln. Verschleierter Code kann verworrene Kontrollstrukturen und die strategische Einfügung irreführender Code-Konstrukte enthalten, wodurch ein komplexes Labyrinth für jeden entsteht, der versucht, die Software zu analysieren.</p>



<p>Eines der Hauptmotive für die C++ Verschleierung besteht darin, geistiges Eigentum und proprietäre Algorithmen zu schützen. Unternehmen, die erhebliche Ressourcen in die Entwicklung innovativer Lösungen investieren, suchen oft nach Möglichkeiten, zu verhindern, dass Konkurrenten oder bösartige Akteure ihren Code leicht verstehen und replizieren können. Die Verschleierung bietet eine zusätzliche Schutzschicht, indem sie den Code für selbst erfahrene Reverse-Engineering-Experten undurchschaubar macht.</p>



<p>Darüber hinaus kann verschleierter Code nicht autorisierte Änderungen abschrecken und vor Schwachstellen schützen, die von Angreifern ausgenutzt werden könnten. Durch die Einführung der Verschleierung können Entwickler das Risiko von Code-Manipulationen verringern, sicherstellen, dass die Software wie beabsichtigt funktioniert, und die Wahrscheinlichkeit von Sicherheitsverstößen reduzieren.</p>



<p>Trotz ihrer Vorteile ist die C++ Verschleierung nicht ohne Herausforderungen. Das Debuggen von verschleiertem Code wird für Entwickler zu einer komplexeren Aufgabe, da herkömmliche Tools Schwierigkeiten bei der Analyse der verworrenen Struktur haben können. Darüber hinaus kann die Leistungseinbuße, die durch verschleierten Code entsteht, ein zu berücksichtigender Faktor sein, obwohl Fortschritte in den Verschleierungstechniken darauf abzielen, diese Auswirkungen zu minimieren. Zusammenfassend steht die C++ Verschleierung als mächtiger Verbündeter im fortlaufenden Kampf um die Sicherheit von Software. Während Entwickler bestrebt sind, ihren Code vor Reverse Engineering und unbefugtem Zugriff zu schützen, bietet die Kunst der Verschleierung ein effektives Mittel, um die Integrität und Vertraulichkeit von proprietärer Software zu gewährleisten. In der sich ständig weiterentwickelnden Welt der Cybersicherheit erweist sich die C++ Verschleierung als kryptischer Schild, der wertvollen Code in einem Schleier aus Komplexität und Widerstandsfähigkeit verbirgt.</p>
<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2024%2F02%2Fdie-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Ddie-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web&amp;action_name=Die+Entwirrung+der+Kunst+der+C%2B%2B+Verschleierung%3A+Code-Sicherung+in+einem+kryptischen+Web&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" /><p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2024/02/die-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web/?pk_campaign=feed&#038;pk_kwd=die-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web">Die Entwirrung der Kunst der C++ Verschleierung: Code-Sicherung in einem kryptischen Web</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.windegger.wtf/de/2024/02/die-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web/?pk_campaign=feed&#038;pk_kwd=die-entwirrung-der-kunst-der-c-verschleierung-code-sicherung-in-einem-kryptischen-web/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Release RabbitExpress</title>
		<link>https://www.windegger.wtf/de/2019/05/release-rabbitexpress/?pk_campaign=feed&#038;pk_kwd=release-rabbitexpress</link>
					<comments>https://www.windegger.wtf/de/2019/05/release-rabbitexpress/?pk_campaign=feed&#038;pk_kwd=release-rabbitexpress#respond</comments>
		
		<dc:creator><![CDATA[rene]]></dc:creator>
		<pubDate>Thu, 02 May 2019 10:34:41 +0000</pubDate>
				<category><![CDATA[Software Entwicklung]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# How To]]></category>
		<category><![CDATA[RabbitMQ]]></category>
		<guid isPermaLink="false">https://www.windegger.wtf/?p=2880</guid>

					<description><![CDATA[<p>Welcome back everyone. You didn&#8217;t hear from me in a long time. But now I have something to share with you. It&#8217;s time to unveil RabbitExpress. During the last years I was working on different projects, most of them involving non disclosure agreements. That&#8217;s why it took some time for me</p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2019/05/release-rabbitexpress/?pk_campaign=feed&#038;pk_kwd=release-rabbitexpress">Release RabbitExpress</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2019%2F05%2Frelease-rabbitexpress%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Drelease-rabbitexpress&amp;action_name=Release+RabbitExpress&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<p><img src="" style="float:right;" align="right" />Welcome back everyone. You didn&#8217;t hear from me in a long time. But now I have something to share with you. It&#8217;s time to unveil <strong>RabbitExpress</strong>.</p>
<p>During the last years I was working on different projects, most of them involving non disclosure agreements.</p>
<p>That&#8217;s why it took some time for me to reappear. During that time I did some side development that got obsoleted by the European parliament when accepting the <a href="https://en.wikipedia.org/wiki/Directive_on_Copyright_in_the_Digital_Single_Market" target="_blank" rel="noopener noreferrer">Directive on Copyright in the Digital Single Market</a>.</p>
<p>When looking over the accumulated repositories a small little class caught my attention. It was not much but a neat little thing.</p>
<p>I started to ask around if it&#8217;s ok to LGPL the code. The feedback was good. So I started to extract the code into a fresh repository. The <a href="https://github.com/rwindegger/RabbitExpress" target="_blank" rel="noopener noreferrer">GitHub repository</a> was born.<span id="more-2880"></span></p>
<h2>Starting an Open Source project</h2>
<p>Starting an open source project is very straight forward. GitHub offers great support to get you started. And even offers you help to select the right license for your requirements.</p>
<p>The next thing after setting up the repository is getting a build setup. One of the easier ways to get going for your .Net project is using a service <a href="https://ci.appveyor.com/project/rwindegger/rabbitexpress" target="_blank" rel="noopener noreferrer">like appveyor.com</a>. Setting up the build is very straight forward and happens in a nice integrate user interface. You select a repository from your linked GitHub account adjust some settings and the build is working.</p>
<p>After being able to build you need to be able to deploy the library. When using the .Net ecosystem there is only one good solution for dependency management and publishing.</p>
<p>Let me <a href="https://www.nuget.org/packages/RabbitExpress/" target="_blank" rel="noopener noreferrer">introduce nuget</a>. Just create an account and you&#8217;re good to go. For the integration with appveyor add an API Key on nuget.org and use it during your build. After a short validation your new package will show up in the package feed.</p>
<h2>Great it&#8217;s there let&#8217;s use it</h2>
<figure id="attachment_2881" aria-describedby="caption-attachment-2881" style="width: 300px" class="wp-caption alignright"><a href="https://www.windegger.wtf/wp-content/uploads/2019/05/RabbitExpress-nuget-result.png"><img loading="lazy" class="size-medium wp-image-2881" src="https://www.windegger.wtf/wp-content/uploads/2019/05/RabbitExpress-nuget-result-300x132.png" alt="RabbitExpress in the Package feed" width="300" height="132" srcset="https://www.windegger.wtf/wp-content/uploads/2019/05/RabbitExpress-nuget-result-300x132.png 300w, https://www.windegger.wtf/wp-content/uploads/2019/05/RabbitExpress-nuget-result-200x88.png 200w, https://www.windegger.wtf/wp-content/uploads/2019/05/RabbitExpress-nuget-result-400x176.png 400w, https://www.windegger.wtf/wp-content/uploads/2019/05/RabbitExpress-nuget-result.png 704w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-2881" class="wp-caption-text">The result when searching for RabbitExpress on the NuGet Package feed.</figcaption></figure>
<p>After all that setup is done you figure out that you need to setup some documentation. GitHub even offers a quick solution for that. Activating GitHub pages on the repository will create a public facing website using Jekyll. There is a set of ready to use themes defined. And your <a href="https://rwindegger.github.io/RabbitExpress/" target="_blank" rel="noopener noreferrer">README.md</a> file will be automatically available.</p>
<p>So with the documentation in place let&#8217;s take a look at how to a reference can be added to RabbitExpress now. Using Visual Studio you can just use the Manage NuGet Packages menu entry. Searching for RabbitExpress will yield the result on the right.</p>
<p>When you use the Visual Studio window simply add the reference to RabbitExpress.JsonSerializer to your project. This will take care of all the dependencies required by RabbitExpress and allows you to use the QueueClient in your project.</p>
<h2>Using RabbitExpress to talk with RabbitMQ</h2>
<p>Integration is very easy. The Examples offer a great start for your use. All you need is an instance of <a href="https://www.rabbitmq.com/" target="_blank" rel="noopener noreferrer">RabbitMQ</a> ready.</p>
<h3>Using the RabbitExpress publisher</h3>
<p>The Publisher just makes use of the Publish method.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/d33c0ebde64d103c1258a70bafab425a">Gist</a>.</p>
<p>As you can see the code is pretty straight forward. Observe the call to Publish in Line 60. The object that is passed is just a plain object. The queue name is specified using the Queues enumeration and prevents typos.</p>
<h3>Implementing a worker using RabbitExpress</h3>
<p>A worker is a simple program that only has one concrete task. In our example the task of the worker is to output messages that it receives from the queue. The example randomly fails and adds the message back into the queue, so another worker can try to process the message or after some time the error is recovered and the current worker receives the message again. When the worker receives an empty message it just rejects the message without adding it to the queue again. Let&#8217;s take a look at the example.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/9f46c7451ebfdde37e8ffe420a2aac25">Gist</a>.</p>
<p>This example requires a little more knowledge. It is using the Methods of the QueuedMessage to signal failure or success. And when it receives the exit message, the loop will end.</p>
<p>You can see the different forms of rejection used in Line 63 and Line 82. In Line 73 you can see the call to Acknowledge.</p>
<h2>What is next</h2>
<p>The next thing to do is adding more serializers to the project. Serializers allow to pass data around in messages. At the moment you will only find a JSON serializer.</p>
<p>Implementing your own serializer is very easy. Just implement the IExpressSerializer interface. Only two methods need your attention to implement the interface.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/f3c8c6b68225c2b53026b4757aea03e6">Gist</a>.</p>
<p>Over the next couple of weeks there will show up different serializers. A Protobuf serializer is already in development and development on a msgpack serializer will begin shortly. Do you have other ideas, let me know in the comments below. When multiple serializers are available adoption rate increases and with higher adoption rate new ideas spring up on it&#8217;s own.</p>
<h2>Conclusion</h2>
<p>Starting an open source project is quite easy. There is a lot of infrastructure already in place and starting the usage is free of charge. After the initial setup there are multiple channels your open source project gets listed. nuget became the predominant channel for package distribution in .Net. No the library is out in the wild. I&#8217;m looking forward to feedback. The project the class was extracted from is already using the new NuGet package. When you use the library and end up here drop a line in the comments.  When encounter an issues, make sure to create an issue on GitHub, also when you think you can contribute. Feel free to create Pull Requests on GitHub.</p>
<p>With all that said. I hope you enjoyed the post. Maybe I have another post sooner than the last time.<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2019%2F05%2Frelease-rabbitexpress%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Drelease-rabbitexpress&amp;action_name=Release+RabbitExpress&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" /></p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2019/05/release-rabbitexpress/?pk_campaign=feed&#038;pk_kwd=release-rabbitexpress">Release RabbitExpress</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.windegger.wtf/de/2019/05/release-rabbitexpress/?pk_campaign=feed&#038;pk_kwd=release-rabbitexpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Generateing EAN-13 barcodes with Javascript and SVG</title>
		<link>https://www.windegger.wtf/de/2017/02/ean-13-barcodes-svg/?pk_campaign=feed&#038;pk_kwd=ean-13-barcodes-svg</link>
					<comments>https://www.windegger.wtf/de/2017/02/ean-13-barcodes-svg/?pk_campaign=feed&#038;pk_kwd=ean-13-barcodes-svg#respond</comments>
		
		<dc:creator><![CDATA[rene]]></dc:creator>
		<pubDate>Thu, 02 Feb 2017 08:00:22 +0000</pubDate>
				<category><![CDATA[Software Entwicklung]]></category>
		<category><![CDATA[barcode]]></category>
		<category><![CDATA[bootstrap.js]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[tools]]></category>
		<guid isPermaLink="false">https://www.windegger.wtf/?p=2550/</guid>

					<description><![CDATA[<p>Everybody knows EAN-13 barcodes, they cover almost every product you will ever hold in your hand. Barcodes play an important role in retail overall. Generally the numbers encoded with EAN-13 are GTINs and help to uniquely identify products. So whenever a store worker scanned an item you most likely have dealt</p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2017/02/ean-13-barcodes-svg/?pk_campaign=feed&#038;pk_kwd=ean-13-barcodes-svg">Generateing EAN-13 barcodes with Javascript and SVG</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2017%2F02%2Fean-13-barcodes-svg%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dean-13-barcodes-svg&amp;action_name=Generateing+EAN-13+barcodes+with+Javascript+and+SVG&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<p><img src="" style="float:right;" align="right" />Everybody knows EAN-13 barcodes, they cover almost every product you will ever hold in your hand. Barcodes play an important role in retail overall. Generally the numbers encoded with EAN-13 are <a href="https://en.wikipedia.org/wiki/Global_Trade_Item_Number" target="_blank">GTINs</a> and help to uniquely identify products. So whenever a store worker scanned an item you most likely have dealt with an EAN-13 barcode.<span id="more-2550"></span></p>
<h2>What are barcodes?</h2>
<figure id="attachment_2545" aria-describedby="caption-attachment-2545" style="width: 300px" class="wp-caption aligncenter"><a href="https://www.windegger.wtf/wp-content/uploads/2017/01/barcode.png"><img loading="lazy" class="size-medium wp-image-2545" src="https://www.windegger.wtf/wp-content/uploads/2017/01/barcode-300x131.png" alt="Screenshot of a barcode.windegger.wtf generated barcode." width="300" height="131" srcset="https://www.windegger.wtf/wp-content/uploads/2017/01/barcode-300x131.png 300w, https://www.windegger.wtf/wp-content/uploads/2017/01/barcode-768x336.png 768w, https://www.windegger.wtf/wp-content/uploads/2017/01/barcode-1024x448.png 1024w, https://www.windegger.wtf/wp-content/uploads/2017/01/barcode-200x88.png 200w, https://www.windegger.wtf/wp-content/uploads/2017/01/barcode-400x175.png 400w, https://www.windegger.wtf/wp-content/uploads/2017/01/barcode.png 1343w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-2545" class="wp-caption-text">Screenshot of a barcode.windegger.wtf generated barcode.</figcaption></figure>
<p>When you like to transfer information in an analogue fashion you have to deal with encoding and decoding the information in an efficient manner. Optical Character Recognition (OCR) could be an efficient way to process human readable data, on the other hand it is very prone to error. Transporting information in a nonhuman readable way is more efficient than dealing with OCR. Barcodes use lines to represent information. The representation of a datum is called encoding. There are many different encodings on the market. Lately QR code became public. QR code is a different form of barcode. The <a href="https://barcode.windegger.wtf/" target="_blank">EAN-13 barcode</a> is classified as 1D barcode. That means that only one dimension of the analogue label contains information. QR code is a encoding that is called 2D barcode. 2D barcodes contain information on both dimensions on the label.</p>
<h2>Why ECMA Script and SVG?</h2>
<p>Scalable Vector Graphics in short SVG is a XML dialect that is able to describe graphics. Those graphics can be scaled to any size and thus are perfect to create printable labels. Every printed barcode needs to be crisp clear otherwise the reader can&#8217;t process the information. Some encodings are capable of error correction but still having the option to scale it up as large as you like makes SVG a great tool for creating a barcode.</p>
<p>Creating the generator in JavaScript ensured that the process is not relaying on server side infrastructure. On the other hand you can integrate it into a server side solution as well using node.js. It might even become possible to integrate it directly into different desktop publishing software.<br />
<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2017%2F02%2Fean-13-barcodes-svg%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dean-13-barcodes-svg&amp;action_name=Generateing+EAN-13+barcodes+with+Javascript+and+SVG&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" /></p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2017/02/ean-13-barcodes-svg/?pk_campaign=feed&#038;pk_kwd=ean-13-barcodes-svg">Generateing EAN-13 barcodes with Javascript and SVG</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.windegger.wtf/de/2017/02/ean-13-barcodes-svg/?pk_campaign=feed&#038;pk_kwd=ean-13-barcodes-svg/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>GeekWire Interview with Joel Spolsky</title>
		<link>https://www.windegger.wtf/de/2016/10/geekwire-interview-with-joel-spolsky/?pk_campaign=feed&#038;pk_kwd=geekwire-interview-with-joel-spolsky</link>
					<comments>https://www.windegger.wtf/de/2016/10/geekwire-interview-with-joel-spolsky/?pk_campaign=feed&#038;pk_kwd=geekwire-interview-with-joel-spolsky#respond</comments>
		
		<dc:creator><![CDATA[rene]]></dc:creator>
		<pubDate>Tue, 18 Oct 2016 07:00:13 +0000</pubDate>
				<category><![CDATA[Software Entwicklung]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[Office Design]]></category>
		<category><![CDATA[Recruiting]]></category>
		<category><![CDATA[Social Studies]]></category>
		<guid isPermaLink="false">https://www.windegger.wtf/?p=2499</guid>

					<description><![CDATA[<p>Joel Spolsky, CEO at the Stack Exchange Network, CEO at Fog Creek Software and co-founder of Trello, talks about a few topics in this interview. He explains why developer don&#8217;t like open floor offices, talks a little about the favorite languages and explains the Joel Test. I totally agree with him about the</p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2016/10/geekwire-interview-with-joel-spolsky/?pk_campaign=feed&#038;pk_kwd=geekwire-interview-with-joel-spolsky">GeekWire Interview with Joel Spolsky</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2016%2F10%2Fgeekwire-interview-with-joel-spolsky%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dgeekwire-interview-with-joel-spolsky&amp;action_name=GeekWire+Interview+with+Joel+Spolsky&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<p><img src="" style="float:right;" align="right" /><a href="http://www.joelonsoftware.com/" target="_blank">Joel Spolsky</a>, CEO at the <a href="http://stackexchange.com/" target="_blank" rel="nofollow">Stack Exchange Network</a>, CEO at Fog Creek Software and co-founder of <a href="https://trello.com/" target="_blank" rel="nofollow">Trello</a>, talks about a few topics in this interview. He explains why developer don&#8217;t like open floor offices, talks a little about the favorite languages and explains the Joel Test.</p>
<p><span id="more-2499"></span></p>
<p>I totally agree with him about the open floor office. It&#8217;s horrible, you can&#8217;t focus on your work and get a flow going. It&#8217;s important to get in the state of mind where you can let the creativity flow, imaging software development as writing book, without the right state of mind you won&#8217;t be productive.</p>
<p>When it comes to office designs, distractions are a big nuisance when trying to get into the flow. When you get interrupted during the flow, it takes some minutes to get back into the flow again. Open offices tend to create interruptions.</p>
<p>I was once working in a small scale open floor office. It was a pain to teach the sales force to not simply come into the room and interrupt everyone. Sales persons tend to need input and they need their input now. Teaching them to prepare their questions in an ordered way and inviting the technician to a meeting does wonders in that regard.</p>
<p>That behavior is understand able, but could break a good flow of code. Joel notes that developers get 2 hours of uninterrupted coding time. During that time, I think the team I&#8217;m working with didn&#8217;t get that time at all.</p>
<h2>How can you help your developers?</h2>
<p>It should be easy to get your developers the uninterrupted daily flow time. The first step is to plan your office time well. Introduce a stand up meeting and enforce the a time constrain. Next start to use your meeting planing tools, block a fixed time slot every day. Figure out the most productive time for every of your developers and let them block that time in their calendar.</p>
<p>So when you see some issues in your current workforce, look at the environment they are working in. It might actually be that your workforce simply needs some flow time to get back on track. When you think your team lacks other issues as well feel free to contact me. It might be easy to get you back on track and make your team deliver great software in time. When you currently not able to answer 12 of 12 questions of <a href="http://www.joelonsoftware.com/articles/fog0000000043.html" target="_blank">the Joel Test</a> with yes, contact me as well and we will figure out how to proceed.<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2016%2F10%2Fgeekwire-interview-with-joel-spolsky%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dgeekwire-interview-with-joel-spolsky&amp;action_name=GeekWire+Interview+with+Joel+Spolsky&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" /></p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2016/10/geekwire-interview-with-joel-spolsky/?pk_campaign=feed&#038;pk_kwd=geekwire-interview-with-joel-spolsky">GeekWire Interview with Joel Spolsky</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.windegger.wtf/de/2016/10/geekwire-interview-with-joel-spolsky/?pk_campaign=feed&#038;pk_kwd=geekwire-interview-with-joel-spolsky/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Capture command line output in C#</title>
		<link>https://www.windegger.wtf/de/2016/02/capture-command-line-output-in-c/?pk_campaign=feed&#038;pk_kwd=capture-command-line-output-in-c</link>
					<comments>https://www.windegger.wtf/de/2016/02/capture-command-line-output-in-c/?pk_campaign=feed&#038;pk_kwd=capture-command-line-output-in-c#comments</comments>
		
		<dc:creator><![CDATA[rene]]></dc:creator>
		<pubDate>Sat, 27 Feb 2016 09:40:43 +0000</pubDate>
				<category><![CDATA[Software Entwicklung]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# How To]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[TAP]]></category>
		<category><![CDATA[Task-based Asynchronous Pattern]]></category>
		<guid isPermaLink="false">https://www.windegger.wtf/?p=2287</guid>

					<description><![CDATA[<p>Did you ever execute a console application in C# and wanted to capture the command line output? You&#8217;re here to find the answer. The Scenario You have a long running console application and want to create an UI for it. You don&#8217;t have the oppurtunity to integrate the console application</p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2016/02/capture-command-line-output-in-c/?pk_campaign=feed&#038;pk_kwd=capture-command-line-output-in-c">Capture command line output in C#</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2016%2F02%2Fcapture-command-line-output-in-c%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dcapture-command-line-output-in-c&amp;action_name=Capture+command+line+output+in+C%23&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<p><img src="" style="float:right;" align="right" />Did you ever execute a console application in C# and wanted to capture the command line output?</p>
<p>You&#8217;re here to find the answer.<span id="more-2287"></span></p>
<h2>The Scenario</h2>
<p>You have a long running console application and want to create an UI for it. You don&#8217;t have the oppurtunity to integrate the console application as a library so you&#8217;re bound to run the executeable. You want to be able to spawn multiple processes at the same time and be able to limit the concurrent execution of the processes. You need to be able to set EnvironmentVariables for the process environment. You need to be able to respond to new lines on the StandardError and StandardInput. You might need to respond to the console application with input.</p>
<h2>The Basics</h2>
<p>The .Net Framework offers a handy class that allows most of the requirements the scenario holds. The class is called System.Diagnostics.Process. After I&#8217;m finished you will have a nice wrapper around the Process class that can be used in many different scenarios. How is the process class helping us? It&#8217;s pretty simple, the Process class is used to start a new process. You need to specify some information in the form of a ProcessStartInfo object and call the Start method on the Process.</p>
<h3>Why do we need a wraper?</h3>
<p>Since .Net Framework 4.5 we can use the <a href="https://msdn.microsoft.com/de-de/library/hh873175(v=vs.110).aspx" target="_blank">TAP</a> (Task-based Asynchronous Pattern) and that&#8217;s what I&#8217;m gonna faciliate to get a class that can be inherited for your own needs and allows you to run multiple instances of the application.</p>
<h3>Getting Started</h3>
<p>First we need the <a href="https://www.windegger.wtf/2016/02/limit-parallel-execution-in-tap/">LimitedConcurrencyTaskScheduler</a> I&#8217;ve provided in an earlier post. If you didn&#8217;t read that post yet go there now and atleast get the code set up in your project. While you do so leave a comment about your expirience.</p>
<p>Since we need a clean way to interact with the process we define an interface. This interface defines a set of properties that allow you to react to updates from the application. It also defines a set of methods that are used to generate the input for the application.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/cb216df08874c3a767e06581ebb3aa15">Gist</a>.</p>
<p>Now that we have sepcified our Environment Builder Interface we are ready to implement our BaseProcess class.</p>
<h2>The BaseProcess Class</h2>
<p>The BaseProcess class specifies some static properties and a set of static methods. Since it is an abstract generic class those static properties and methods will be initialized per implementation. The static members are used for parallelization, we define our LimitedConcurrencyTaskScheduler used for scheduling our child processes and a <a href="https://msdn.microsoft.com/de-de/library/he2s3bh7(v=vs.110).aspx">LinkedList</a> that will hold our processes. The static Start methods provide a way to enqueue a new process to the queue. The argument for that methods will be our environment builders. Our class defines two properties, the command line of the process to run and the environment that will be used during execution. The two fields are used to generate the console output, one for locking the StringBuilder and one to generate the output. The constructor of the class sets the command line so make sure to specify it in your implementation class. The protected Execute method does the actual work of spawning the new child process. The private methods are handlers for some of the events triggered by the System.Diagnostics.Process class. Those memebers will call the abstract members defined in the class.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/f07c38fb4e0d1827e66f454b9098ca13">Gist</a>.</p>
<p>So Now that we have the Base Process class ready we can start to make use of it in one of our projects.<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2016%2F02%2Fcapture-command-line-output-in-c%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dcapture-command-line-output-in-c&amp;action_name=Capture+command+line+output+in+C%23&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" /></p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2016/02/capture-command-line-output-in-c/?pk_campaign=feed&#038;pk_kwd=capture-command-line-output-in-c">Capture command line output in C#</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.windegger.wtf/de/2016/02/capture-command-line-output-in-c/?pk_campaign=feed&#038;pk_kwd=capture-command-line-output-in-c/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Limit parallel execution in TAP</title>
		<link>https://www.windegger.wtf/de/2016/02/limit-parallel-execution-in-tap/?pk_campaign=feed&#038;pk_kwd=limit-parallel-execution-in-tap</link>
					<comments>https://www.windegger.wtf/de/2016/02/limit-parallel-execution-in-tap/?pk_campaign=feed&#038;pk_kwd=limit-parallel-execution-in-tap#comments</comments>
		
		<dc:creator><![CDATA[rene]]></dc:creator>
		<pubDate>Wed, 24 Feb 2016 20:54:26 +0000</pubDate>
				<category><![CDATA[Software Entwicklung]]></category>
		<category><![CDATA[async]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# How To]]></category>
		<category><![CDATA[TAP]]></category>
		<category><![CDATA[Task-based Asynchronous Pattern]]></category>
		<guid isPermaLink="false">https://www.windegger.wtf/?p=2292</guid>

					<description><![CDATA[<p>Did you ever want to limit the parallel execution of a task, when using task-based asynchronous pattern in c#? In the next few step I guide you through the creation of a TaskScheduler that will enable you exactly that. The Scenario You need to limit parallel execution of tasks that</p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2016/02/limit-parallel-execution-in-tap/?pk_campaign=feed&#038;pk_kwd=limit-parallel-execution-in-tap">Limit parallel execution in TAP</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2016%2F02%2Flimit-parallel-execution-in-tap%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dlimit-parallel-execution-in-tap&amp;action_name=Limit+parallel+execution+in+TAP&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<p><img src="" style="float:right;" align="right" />Did you ever want to limit the parallel execution of a task, when using task-based asynchronous pattern in c#?</p>
<p>In the next few step I guide you through the creation of a TaskScheduler that will enable you exactly that.<br />
<span id="more-2292"></span></p>
<h2>The Scenario</h2>
<p>You need to limit parallel execution of tasks that are started. You need to be able to limit the execution only for certain tasks.</p>
<h2>The Basics</h2>
<p>The .Net Framework offers a technology called Task-based Asynchronous Pattern. This pattern allows you to parallelize operations in a very simple way and automatically deals with the different schedulers that are used during runtime. For example it&#8217;s possible to use the await keyword to launch a long running operation from the main UI thread. And wait for the task and continue with your code scheduled back to the main UI thread.</p>
<p>In the back the TAP makes use of different <a href="https://msdn.microsoft.com/en-US/library/system.threading.tasks.taskscheduler(v=vs.110).aspx" target="_blank">TaskSchedulers</a> but for our example we&#8217;re going to implement our own to limit parallel execution of the different queued Tasks.</p>
<h2>The Code</h2>
<p>So here is the code. Feel free to use it in your projects, just drop a comment.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/4367505245145f2d465a753ffa65df0f">Gist</a>.</p>
<h2>What&#8217;s it all about?</h2>
<p>It&#8217;s pretty simple we have multiple methods we override, a property that handles the currently alowed degree of parallelism and Some fields that hold the current state of the scheduler. The code is pretty much self explainatory.</p>
<p>The ThreadStatic at the top is a marker if the current ThreadPool thread is processing items. The Tasks get queued into a LinkList called m_Tasks. And there is a counter for how many delegates are there. The constructor takes one argument and sets the degreee of parallelism.</p>
<p>The linked list is also used as a lock for the synchronization of the work balancing.</p>
<h2>Why limit parallel execution of Tasks?</h2>
<p>In my next Post I&#8217;m going to show you a <a href="https://www.windegger.wtf/2016/02/capture-command-line-output-in-c/">useful example</a> that needs limit parallel execution.<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2016%2F02%2Flimit-parallel-execution-in-tap%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dlimit-parallel-execution-in-tap&amp;action_name=Limit+parallel+execution+in+TAP&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" /></p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2016/02/limit-parallel-execution-in-tap/?pk_campaign=feed&#038;pk_kwd=limit-parallel-execution-in-tap">Limit parallel execution in TAP</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.windegger.wtf/de/2016/02/limit-parallel-execution-in-tap/?pk_campaign=feed&#038;pk_kwd=limit-parallel-execution-in-tap/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Know your enemies with Friendly Assemblies</title>
		<link>https://www.windegger.wtf/de/2013/03/friendly-assemblies/?pk_campaign=feed&#038;pk_kwd=friendly-assemblies</link>
					<comments>https://www.windegger.wtf/de/2013/03/friendly-assemblies/?pk_campaign=feed&#038;pk_kwd=friendly-assemblies#respond</comments>
		
		<dc:creator><![CDATA[rene]]></dc:creator>
		<pubDate>Fri, 01 Mar 2013 08:00:24 +0000</pubDate>
				<category><![CDATA[Software Entwicklung]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# How To]]></category>
		<category><![CDATA[Developer Command Prompt for VS2012]]></category>
		<category><![CDATA[friendly assemblies]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[InternalsVisibleTo]]></category>
		<category><![CDATA[sn.exe]]></category>
		<category><![CDATA[Strong-Name Signing]]></category>
		<category><![CDATA[Visual Studio Command Line]]></category>
		<category><![CDATA[Visual Studio How To]]></category>
		<category><![CDATA[Visual Stuido]]></category>
		<guid isPermaLink="false">http://www.automism.at/?p=1872</guid>

					<description><![CDATA[<p>Recently I was asked to make certain members of an assembly accessible to a defined set of friendly assemblies. After a short recherche it was obvious that we need to use InternalsVisibleTo. Since there was no good guide on how to use that mighty attribute, we decided to make a small guide for</p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2013/03/friendly-assemblies/?pk_campaign=feed&#038;pk_kwd=friendly-assemblies">Know your enemies with Friendly Assemblies</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
<img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2013%2F03%2Ffriendly-assemblies%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dfriendly-assemblies&amp;action_name=Know+your+enemies+with+Friendly+Assemblies&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<p><img src="" style="float:right;" align="right" />Recently I was asked to make certain members of an assembly accessible to a defined set of friendly assemblies. After a short recherche it was obvious that we need to use InternalsVisibleTo. Since there was no good guide on how to use that mighty attribute, we decided to make a small guide for our readers.<span id="more-1872"></span></p>
<h2>The solution and its friendly assemblies</h2>
<p>We start with a Blank Solution and describe everything as detailed as possible.</p>
<p>To create a Blank Solution start your Visual Studio 2012 and wait until it is loaded. When Visual Studio is ready press [CTRL] + [SHIFT] + [n]. The New Project Dialog will open. Adjust your selection according to the next screenshot and give your Solution a name.</p>
<figure id="attachment_2298" aria-describedby="caption-attachment-2298" style="width: 300px" class="wp-caption aligncenter"><a href="https://www.windegger.wtf/wp-content/uploads/2013/03/blank-solution.png" rel="attachment wp-att-2298"><img loading="lazy" class="size-medium wp-image-2298" src="https://www.windegger.wtf/wp-content/uploads/2013/03/blank-solution-300x207.png" alt="How to create a blank solution" width="300" height="207" srcset="https://www.windegger.wtf/wp-content/uploads/2013/03/blank-solution-300x207.png 300w, https://www.windegger.wtf/wp-content/uploads/2013/03/blank-solution-768x530.png 768w, https://www.windegger.wtf/wp-content/uploads/2013/03/blank-solution-200x138.png 200w, https://www.windegger.wtf/wp-content/uploads/2013/03/blank-solution.png 953w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-2298" class="wp-caption-text">Create a Blank Solution</figcaption></figure>
<p>Click the OK button to create your Blank Solution. Now we need some Projects in our Solution to demonstrate the behavior we&#8217;ll need at least 3 Solutions. One Console Application and two ClassLibraries. We select File &#8211; Add &#8211; New Project in Visual Studio and create Projects with the following names. Just make your selection according to the following screenshots.</p>
<ul>
<li>at.automism.FriendlyAssemblies.Consumer</li>
<li>at.automism.FriendlyAssemblies.Secret</li>
<li>at.automism.FriendlyAssemblies.Public</li>
</ul>
<figure id="attachment_2299" aria-describedby="caption-attachment-2299" style="width: 300px" class="wp-caption aligncenter"><a href="https://www.windegger.wtf/wp-content/uploads/2013/03/console-application.png" rel="attachment wp-att-2299"><img loading="lazy" class="size-medium wp-image-2299" src="https://www.windegger.wtf/wp-content/uploads/2013/03/console-application-300x207.png" alt="How to create a Console Application" width="300" height="207" srcset="https://www.windegger.wtf/wp-content/uploads/2013/03/console-application-300x207.png 300w, https://www.windegger.wtf/wp-content/uploads/2013/03/console-application-768x531.png 768w, https://www.windegger.wtf/wp-content/uploads/2013/03/console-application-200x138.png 200w, https://www.windegger.wtf/wp-content/uploads/2013/03/console-application.png 954w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-2299" class="wp-caption-text">Create a Console Application</figcaption></figure>
<figure id="attachment_2297" aria-describedby="caption-attachment-2297" style="width: 300px" class="wp-caption aligncenter"><a href="https://www.windegger.wtf/wp-content/uploads/2013/03/class-library.png" rel="attachment wp-att-2297"><img loading="lazy" class="size-medium wp-image-2297" src="https://www.windegger.wtf/wp-content/uploads/2013/03/class-library-300x207.png" alt="Create a Class Library" width="300" height="207" srcset="https://www.windegger.wtf/wp-content/uploads/2013/03/class-library-300x207.png 300w, https://www.windegger.wtf/wp-content/uploads/2013/03/class-library-768x530.png 768w, https://www.windegger.wtf/wp-content/uploads/2013/03/class-library-200x138.png 200w, https://www.windegger.wtf/wp-content/uploads/2013/03/class-library.png 953w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-2297" class="wp-caption-text">Create a Class Library</figcaption></figure>
<p>Now we have the project structure for our little demo application.</p>
<h2>Setup the Solution to use Strong-Name Signing</h2>
<p>Its time to sign our assemblies to be able to identify the friendly assemblies.<br />
Start the &#8222;Developer Command Prompt for VS2012&#8220; enter your Solution directory and execute the following steps.</p>
<p>In our example we will generate only one KeyPair that will be used to sign all Assemblies.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/9bb6bb06af1d345ce7ac492d8d0646e8">Gist</a>.</p>
<p>When everything worked out you will see something similar to the following screenshot.</p>
<figure id="attachment_2296" aria-describedby="caption-attachment-2296" style="width: 300px" class="wp-caption aligncenter"><a href="https://www.windegger.wtf/wp-content/uploads/2013/03/generate-snk.png" rel="attachment wp-att-2296"><img loading="lazy" class="size-medium wp-image-2296" src="https://www.windegger.wtf/wp-content/uploads/2013/03/generate-snk-300x210.png" alt="How to create a KeyPair for Strong-Name Signing" width="300" height="210" srcset="https://www.windegger.wtf/wp-content/uploads/2013/03/generate-snk-300x210.png 300w, https://www.windegger.wtf/wp-content/uploads/2013/03/generate-snk-78x56.png 78w, https://www.windegger.wtf/wp-content/uploads/2013/03/generate-snk-200x140.png 200w, https://www.windegger.wtf/wp-content/uploads/2013/03/generate-snk.png 675w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-2296" class="wp-caption-text">How to create a KeyPair for Strong-Name Signing</figcaption></figure>
<p>Now we configure Signing for our Projects, repeat this steps for all Projects in the Solution.</p>
<ol>
<li>Click the Project in the Solution Explorer.</li>
<li>Press [ALT] + [Enter] to open the Properties Window.</li>
<li>Click on Signing on the left side.</li>
<li>Check Sign the assembly.</li>
<li>Select &#8222;&lt;Browse&#8230;&gt;&#8220; in the now enabled Drop Down box.</li>
<li>Select the generated .snk file in the opened File Open Dialog box.</li>
<li>Click Open.</li>
<li>Press [CTRL] + [s] to save the changes.</li>
</ol>
<p>Press [CTRL] + [b] to start a build and make sure everything is still working.</p>
<h2>Put some spread on the bread</h2>
<p>Now that the Solution is set up, we add some Code to our projects.</p>
<p>Start with the &#8222;at.automism.FriendlyAssemblies.Secret&#8220; Project. Visual Studio already generated a class for us, we&#8217;re going to change it to fit our needs.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/6bc11c2903a7f24c5626f1172c23211d">Gist</a>.</p>
<p>There is nothing spectacular about our Greeter Class. It just defines two Methods and sets the access modifier of one of the methods to internal.</p>
<p>Now we add the &#8222;at.automism.FriendlyAssemblies.Consumer&#8220; as friendly assembly. Open the AssemblyInfo.cs file located in the Properties folder of the Project &#8222;at.automism.FriendlyAssemblies.Secret&#8220;.</p>
<p>At the end of the file add the InternalsVisibleToAttribute like in the following example.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/5fc32a9f75f51ba32c93dbf1502678d6">Gist</a>.</p>
<p>The Parameter for the Attribute is defined as &#8222;&lt;name of the friendly assembly&gt;, PublicKey=&lt;key found in the at.automism.FriendlyAssemblies.txt file&gt;&#8220;. Make sure to remove all line breaks from the public key.</p>
<p>Now we add a reference to our &#8222;at.automism.FriendlyAssemblies.Secret&#8220; in the other two Projects.</p>
<ol>
<li><span style="line-height: 13px;">Right click the References Folder of the Project.</span></li>
<li>Select &#8222;Add Reference&#8230;&#8220;.</li>
<li>On the left side of the opened window select Solution &#8211; Projects.</li>
<li>Check the box right in front of the desired Project.</li>
<li>Click OK when finished.</li>
</ol>
<p>When you have added the references hit [CTRL] + [b] and make sure the build works as expected.</p>
<p>Now we modify the code in the &#8222;at.automism.FriendlyAssemblies.Public&#8220; Project. Just modify the already existing class to look like the snippet below.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/9d918a66280982d5e151412346432560">Gist</a>.</p>
<p>You probably have noticed that you can&#8217;t access the WhisperHello Method from that file. That happens because the the method is only visible to friendly assemblies.</p>
<p>We add a reference to &#8222;at.automism.FriendlyAssemblies.Public&#8220; to the &#8222;at.automism.FriendlyAssemblies.Consumer&#8220; Project. Just follow the steps done earlier.</p>
<p>Adjust the Program.cs file to look like the following snippet.</p>
<p>View the code on <a href="https://gist.github.com/rwindegger/8ac3c7cf1c0f36d4378b79ecee54cf5b">Gist</a>.</p>
<p>Have you noticed how WisperHello was available in Intellisense when making the adjustments?</p>
<p>When everything went OK you can hit F5 and will be presented with something similar to the screenshot below.</p>
<figure id="attachment_2295" aria-describedby="caption-attachment-2295" style="width: 300px" class="wp-caption aligncenter"><a href="https://www.windegger.wtf/wp-content/uploads/2013/03/result.png" rel="attachment wp-att-2295"><img loading="lazy" class="wp-image-2295 size-medium" src="https://www.windegger.wtf/wp-content/uploads/2013/03/result-300x151.png" alt="The result of the hard work" width="300" height="151" srcset="https://www.windegger.wtf/wp-content/uploads/2013/03/result-300x151.png 300w, https://www.windegger.wtf/wp-content/uploads/2013/03/result-672x340.png 672w, https://www.windegger.wtf/wp-content/uploads/2013/03/result-200x101.png 200w, https://www.windegger.wtf/wp-content/uploads/2013/03/result.png 675w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-2295" class="wp-caption-text">The result of the hard work</figcaption></figure>
<h2>Reference</h2>
<p><a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx" target="_blank">InternalsVisibleTo</a><img src="https://analytics.windegger.wtf/piwik.php?idsite=3&amp;rec=1&amp;url=https%3A%2F%2Fwww.windegger.wtf%2Fde%2F2013%2F03%2Ffriendly-assemblies%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dfriendly-assemblies&amp;action_name=Know+your+enemies+with+Friendly+Assemblies&amp;urlref=https%3A%2F%2Fwww.windegger.wtf%2Fde%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" /></p>
<p>The post <a rel="nofollow" href="https://www.windegger.wtf/de/2013/03/friendly-assemblies/?pk_campaign=feed&#038;pk_kwd=friendly-assemblies">Know your enemies with Friendly Assemblies</a> appeared first on <a rel="nofollow" href="https://www.windegger.wtf/de/">Rene Windegger</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.windegger.wtf/de/2013/03/friendly-assemblies/?pk_campaign=feed&#038;pk_kwd=friendly-assemblies/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
