4
The scenario is as follows:
I have a AssemblyProtegido.dll
written in . NET that contains public classes. I wish only specific assemblies could consume such classes.
Assemplyprotegido.csproj
public class ClasseProtegida
{
public void AlgumMetodo() {...}
}
Allowed.csproj
using AssemblyProtegido;
class Classe1 {
//OK
private ClasseProtegida obj = new ClasseProtegida();
}
Third.csproj
using AssemblyProtegido;
class Classe1 {
//lançaria algum tipo de exceção ao tentar instanciar a classe.
private ClasseProtegida obj = new ClasseProtegida();
}
This type of protection is possible?
Grateful.
Thanks a lot, bro.
– Eric Cordeiro