How can I limit the loading and execution of my libraries based on a defined precondition? For example, if I distribute to a client an application that uses an external library, how can I ensure the external library is only used with the application and not used by the client for other purposes?
Is code access security the answer? If so, is there a good example of how to apply it in the situation described above?
Thanks!
UPDATE: I cannot use services to protect the logic. I must supply the code in an assembly, and want to protect it from being used to build other products.