Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is transparent class or transparent method in C#?`

Tags:

c#

fxcop

I have C# code and when I run FXCop against it, it yields a strange error which I tried to understand but I couldn't. The error says

Transparent Methods Must Not Satisfy Link Demands.

Here what I don't understand is what is a transparent method? When going though the MSDN help I came across a term called transparent class.

Can anyone please explain me what transparent class or transparent mehod mean?

like image 859
Rana Avatar asked Sep 19 '25 19:09

Rana


1 Answers

Quote from msdn page http://msdn.microsoft.com/en-us/library/ee191569(v=vs.110).aspx

Transparency is an enforcement mechanism that separates code that runs as part of the application from code that runs as part of the infrastructure. Transparency draws a barrier between code that can do privileged things (critical code), such as calling native code, and code that cannot (transparent code). Transparent code can execute commands within the bounds of the permission set it is operating in, but cannot execute, derive from, or contain critical code.

like image 64
Pavel Krymets Avatar answered Sep 21 '25 13:09

Pavel Krymets