开发者

Using [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.Windows")] To expose Internal properties

Ok so I had a qustion awhile back regarding Silverlight 4 Data Binding with anonymous types, one of the answers was to use [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.Windows")] in your AssemblyInfo.cs file.

I tried this and it works!

I know I'm making all my internal properties classes and methods visible to the System.Windows Assembley. But what kind of risk is this with the following in mind:

The product is a hosted silverlight based w开发者_JAVA技巧eb application, so it wont be distributed.

Thanks in advance


Well, actually it will be distributed to every client that accesses it, but that is not the point.

Information hiding is primarily a API design concern. If allowing a framework assembly to peek into your assemblies in order to facilitate your development I see no problems with it.

No one is going to be able to backdoor you if that is what you are worried about.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜