Reputation: 159
In the Roslyn scripting environment if the user creates scripts he has the ability to reference assemblies like #r "Assembly.dll" or #r "System.Drawing" things like that. Is there a way to get all of these out of a file before executing it? I basically do not want to create a huge security problem when the user has access to like... everything.
Upvotes: 1
Views: 1440
Reputation: 19031
If you want to get the list of references that were #r
'ed, you can access that from Compilation.DirectiveReferences
.
Upvotes: 2