The scenario is as follows:
I have a AssemblyProtegido.dll
written in .NET that contains public classes. I would like only specific assemblies to 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();
}
Is this type of protection possible?
Thank you.