Client LuaCsForBarotrauma
|
AssemblyLoadContext to compile from syntax trees in memory and to load from disk/file. Provides dependency resolution. [IMPORTANT] Only supports 1 in-memory compiled assembly at a time. Use more instances if you need more. [IMPORTANT] All file assemblies required for the compilation of syntax trees should be loaded first. More...
Public Member Functions | |
MemoryFileAssemblyContextLoader (AssemblyManager assemblyManager) | |
AssemblyLoadingSuccessState | LoadFromFiles ([NotNull] IEnumerable< string > assemblyFilePaths) |
Try to load the list of disk-file assemblies. More... | |
AssemblyLoadingSuccessState | CompileAndLoadScriptAssembly ([NotNull] string assemblyName, [NotNull] IEnumerable< SyntaxTree > syntaxTrees, IEnumerable< MetadataReference > externMetadataReferences, [NotNull] CSharpCompilationOptions compilationOptions, out string compilationMessages, IEnumerable< Assembly > externFileAssemblyReferences=null) |
Compiles the supplied syntaxtrees and options into an in-memory assembly image. Builds metadata from loaded assemblies, only supply your own if you have in-memory images not managed by the AssemblyManager class. More... | |
Protected Member Functions | |
override Assembly | Load (AssemblyName assemblyName) |
Protected Attributes | |
bool | IsResolving |
Properties | |
string | FriendlyName [get, set] |
Assembly | CompiledAssembly [get] |
byte[] | CompiledAssemblyImage [get] |
bool | IsTemplateMode [get, set] |
bool | IsDisposed [get] |
AssemblyLoadContext to compile from syntax trees in memory and to load from disk/file. Provides dependency resolution. [IMPORTANT] Only supports 1 in-memory compiled assembly at a time. Use more instances if you need more. [IMPORTANT] All file assemblies required for the compilation of syntax trees should be loaded first.
Definition at line 23 of file MemoryFileAssemblyContextLoader.cs.
MemoryFileAssemblyContextLoader.MemoryFileAssemblyContextLoader | ( | AssemblyManager | assemblyManager | ) |
Definition at line 38 of file MemoryFileAssemblyContextLoader.cs.
AssemblyLoadingSuccessState MemoryFileAssemblyContextLoader.CompileAndLoadScriptAssembly | ( | [NotNull] string | assemblyName, |
[NotNull] IEnumerable< SyntaxTree > | syntaxTrees, | ||
IEnumerable< MetadataReference > | externMetadataReferences, | ||
[NotNull] CSharpCompilationOptions | compilationOptions, | ||
out string | compilationMessages, | ||
IEnumerable< Assembly > | externFileAssemblyReferences = null |
||
) |
Compiles the supplied syntaxtrees and options into an in-memory assembly image. Builds metadata from loaded assemblies, only supply your own if you have in-memory images not managed by the AssemblyManager class.
assemblyName | Name of the assembly. Must be supplied for in-memory assemblies. |
syntaxTrees | Syntax trees to compile into the assembly. |
externMetadataReferences | Metadata to be used for compilation. [IMPORTANT] This method builds metadata from loaded assemblies, only supply your own if you have in-memory images not managed by the AssemblyManager class. |
compilationOptions | CSharp compilation options. This method automatically adds the 'IgnoreAccessChecks' property for compilation. |
compilationMessages | Will contain any diagnostic messages for compilation failure. |
externFileAssemblyReferences | Additional assemblies located in the FileSystem to build metadata references from. Assemblies here will have duplicates by the same name that are currently loaded filtered out. |
ArgumentNullException | Throws exception if any of the required arguments are null. |
Definition at line 135 of file MemoryFileAssemblyContextLoader.cs.
|
protected |
Definition at line 260 of file MemoryFileAssemblyContextLoader.cs.
AssemblyLoadingSuccessState MemoryFileAssemblyContextLoader.LoadFromFiles | ( | [NotNull] IEnumerable< string > | assemblyFilePaths | ) |
Try to load the list of disk-file assemblies.
assemblyFilePaths | Operation success or failure reason. |
Definition at line 50 of file MemoryFileAssemblyContextLoader.cs.
|
protected |
Definition at line 33 of file MemoryFileAssemblyContextLoader.cs.
|
get |
Definition at line 28 of file MemoryFileAssemblyContextLoader.cs.
|
get |
Definition at line 29 of file MemoryFileAssemblyContextLoader.cs.
|
getset |
Definition at line 26 of file MemoryFileAssemblyContextLoader.cs.
|
get |
Definition at line 36 of file MemoryFileAssemblyContextLoader.cs.
|
getset |
Definition at line 35 of file MemoryFileAssemblyContextLoader.cs.