<?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>Alas, Smith and Jones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx</link><description>We have a feature in C# which allows you to declare a " friend assembly ". If assembly Smith says that assembly Jones is its friend, then code in Jones is allowed to see "internal" types of Smith as though they were public(*). It's a pretty handy feature</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Alas, Smith and Jones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx#9740420</link><pubDate>Sat, 13 Jun 2009 02:23:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9740420</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Mel Smith's career didn't last much longer than the TV series, Griff Rhys Jones however is still everywhere on the BBC.&lt;/p&gt;
&lt;p&gt;I've found InternalsVisible great for whitebox testing, if you're a believer in that.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9740420" width="1" height="1"&gt;</description></item><item><title>Увы, Смит и Джонс</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx#9723937</link><pubDate>Wed, 10 Jun 2009 14:19:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9723937</guid><dc:creator>Невероятные приключения в коде (перевод блога Эрика Липперта)</dc:creator><description>&lt;p&gt;В C# есть возможность объявить &amp;#171; дружественную сборку &amp;#187;. Если сборка Смит говорит, что сборка Джонс –&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9723937" width="1" height="1"&gt;</description></item><item><title>Community Convergence XLIX (IL)</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx#9718424</link><pubDate>Tue, 09 Jun 2009 23:45:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9718424</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Welcome to the 49th edition of Community Convergence. The big excitment of late has been the recent release&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9718424" width="1" height="1"&gt;</description></item><item><title>re: Alas, Smith and Jones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx#9702678</link><pubDate>Sat, 06 Jun 2009 12:30:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9702678</guid><dc:creator>Mark Rendle</dc:creator><description>&lt;p&gt;I find the InternalsVisibleTo attribute extremely useful for n-Tier solutions, especially those with interchangeable assemblies providing interop with different database servers or other external solutions.&lt;/p&gt;
&lt;p&gt;The thing I'd really like would be GUI support for it in VS 2010. Many of the AssemblyInfo.cs attributes are exposed in the Project Properties pages, so why not InternalsVisibleTo? Especially useful for the strongly-named assemblies.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9702678" width="1" height="1"&gt;</description></item><item><title>re: Alas, Smith and Jones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx#9702494</link><pubDate>Sat, 06 Jun 2009 06:29:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9702494</guid><dc:creator>Gabe</dc:creator><description>&lt;P&gt;Is it wrong that I first read the title of this post as "Alias, Smith and Jones" (like the old TV show)?&lt;/P&gt;
&lt;DIV class=yellowbox&gt;
&lt;P&gt;No, not at all. Smith and Jones named their comedy show "Alas Smith and Jones" as a pun on "Alias Smith and Jones" -- Eric&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9702494" width="1" height="1"&gt;</description></item><item><title>re: Alas, Smith and Jones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx#9702161</link><pubDate>Sat, 06 Jun 2009 01:12:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9702161</guid><dc:creator>George Spofford</dc:creator><description>&lt;p&gt; @jcoehoorn: +1. &amp;nbsp;Unit tests often need to test things otherwise marked as private or internal, and contorting the design or the visibility for the sake of enabling a unit test seems unnecessary. (I know some people believe that you should only unit test public interfaces, but when they rely on sufficiently interesting private information, the goal of confirming correct behaviors and states is greatly simplified, and therefore more cheaply and correctly performed, by testing private methods and asserting on private properties/member variables as well.) As stated, friend assemblies don't seem to solve the problem of unit-testing private methods, but it will help a great deal nonetheless. &lt;/p&gt;
&lt;p&gt;It has always struck me that public, private, protected, internal are simply coarse access control mechanisms, and for ORM and unit-testing purposes we would benefit from finer-grain access control.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9702161" width="1" height="1"&gt;</description></item><item><title>re: Alas, Smith and Jones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx#9701305</link><pubDate>Fri, 05 Jun 2009 16:28:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9701305</guid><dc:creator>Bruno Martinez</dc:creator><description>&lt;p&gt;&amp;quot;We restrict Smith from exposing internals to weakly-named assemblies so that Smith does not accidentally create this security hole or accidentally mislead you into believing that Smith's internals are in any way hidden from partially-trusted code.&amp;quot;&lt;/p&gt;
&lt;p&gt;IMO, the chain of trust of strong naming is a mistake. Nothing prevents that Smith gives away a key so that anybody can build a Jones account. I asked this here &lt;a rel="nofollow" target="_new" href="http://stackoverflow.com/questions/868799/why-cant-strongly-named-assemblies-use-assemblies-that-arent-signed"&gt;http://stackoverflow.com/questions/868799/why-cant-strongly-named-assemblies-use-assemblies-that-arent-signed&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9701305" width="1" height="1"&gt;</description></item><item><title>re: Alas, Smith and Jones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx#9701008</link><pubDate>Fri, 05 Jun 2009 11:13:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9701008</guid><dc:creator>Matthew Jones</dc:creator><description>&lt;P&gt;I love how you used Smith and Jones in this article :-)&lt;/P&gt;
&lt;P&gt;I didn't know you guys over in the US knew who Smith and Jones are. &amp;nbsp;I'm from the UK and grew up with them on TV, they're awesome aren't they :-)&lt;/P&gt;
&lt;P&gt;I didn't think I'd ever see them used to illustrate a programming related concept, kudos to you sir ;-)&lt;/P&gt;
&lt;DIV class=yellowbox&gt;
&lt;P&gt;My introduction to Smith and Jones was the London Weekend Television adaptation of "Wilt", which was a favourite novel of mine in my younger days. Jones completely nails the character of Wilt. -- Eric&lt;/P&gt;&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9701008" width="1" height="1"&gt;</description></item><item><title>re: Alas, Smith and Jones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx#9700430</link><pubDate>Fri, 05 Jun 2009 01:59:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700430</guid><dc:creator>jcoehoorn</dc:creator><description>&lt;p&gt;@KodefuGuru: I've found it actually improves encapsulation, by allowing you to mark some things as internal that would otherwise need to be given greater access to allow for unit testing.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9700430" width="1" height="1"&gt;</description></item><item><title>re: Alas, Smith and Jones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/06/04/alas-smith-and-jones.aspx#9700370</link><pubDate>Fri, 05 Jun 2009 01:20:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700370</guid><dc:creator>marc.gravell</dc:creator><description>&lt;p&gt;A good way of expressing it, as always.&lt;/p&gt;
&lt;p&gt;Now if only the syntax for InternalsVisibleTo were prettier - perhaps using the public key *token* rathen than the full key...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9700370" width="1" height="1"&gt;</description></item></channel></rss>