c# - Restrict class access to certain methods (e.g. writing to a console) -


is there way can limit access of class or class object functionality (e.g. writing console)?

i have main console project writes , reads console. loads various .dll library files (like mini programs) , uses methods.

i wondering if there's way make .dll assemblies ask permission or restrict direct access console's input/output , make through e.g. class mediator/manager.

say writing extension (mini program) project. wouldn't want freely writing console application.

p.s. question doesn't apply console applications only.

i suggest write own customconsole avoid using it. since original console standard , built in os way control on sinatr told you. again can open it. if work own console wont have bother of writes in or not. after pipe standard console towards "manager" in order filter message , keep want , remove others.

as original question. dont know way possible prevent class use methods other classes. make external code possibly unstable. suggest use tracing tools , scan calls external library in order know use (in case should absolutly not call specific methods). if external code doesen't fit program avoid using it.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -