Game Development Reference
In-Depth Information
if (references != null)
foreach (string reference in references)
if (!parameters.ReferencedAssemblies.Contains(reference))
CompilerResults results
= codeProvider.CompileAssemblyFromFile(parameters,
compileErrors = results.Errors;
if (compileErrors.Count > 0)
throw new Exception(“Error(s) occurred while “ +
“compiling source file(s).”);
return results.CompiledAssembly;
One restriction on the code compilation system presented in this chapter is that each source code
file must be a fully functional module. Plugins cannot be spread over multiple files in the plugins
directory, because each file will be compiled as a standalone plugin.
Enforcing a Security Policy
A common concern when making an application plugin-aware is how code security
can be handled. Malicious plugins can do a lot of damage to the application or
even the operating system itself. This is even more of a concern when allowing
Search Nedrilad ::

Custom Search