Table of Contents

Class RoslynScriptProvider

Namespace
Alternet.Scripter.Roslyn
Assembly
Alternet.Scripter.v9.dll

Provides a base class for Roslyn code generation. This class is abstract.

public abstract class RoslynScriptProvider : IDisposable
Inheritance
RoslynScriptProvider
Implements
Derived

Constructors

RoslynScriptProvider(IScriptHost, SourceCodeKind)

Initializes a new instance of the RoslynScriptProvider class with specified IScriptHost.

Properties

AssemblyBytes

Gets assembly bytes when the script is compiled in the memory.

AssemblyFileName

Gets or sets script assembly file name.

AssemblyPath

Gets or sets script assembly file path.

AssemblyTargetPath

Represents the fully qualified path of the assembly file.

Compilation

Gets a current project or code Microsoft.CodeAnalysis.Compilation.

DebugBytes

Gets pdb bytes when the script is compiled in the memory.

EmbeddedResources

List of the compilation's managed resources. Null to indicate that there are none.

MetadataResolver
NamespaceAssociation
PDBTargetPath

Represents the .pdb file path.

ScriptAssembly

Gets compiled script assembly.

ScriptCompiled

Indicates whether script has been successfully compiled.

ScriptHost
ScriptRun
ScriptSource
SourceKind
SourceResolver
Workspace

Gets a current project or code Microsoft.CodeAnalysis.Workspace.

Methods

AddGlobalCode(ProjectId, IList<IScriptGlobalItem>)
AddGlobalCode(IList<SyntaxTree>, IList<IScriptGlobalItem>)
AddManifestResource(byte[], string)
AddManifestResource(string, string)
AddResource(string, string)
ApplySolutionChanges(Func<Solution, Solution>)
Compile(bool, bool)

Compiles the script.

CreateCompilation(string, bool, bool)
CreateExpressionCompilation()
CreateProjectCompilation(string, bool)
CreateScriptCodeCompilation()
CreateScriptCompilation(IList<SyntaxTree>, IList<MetadataReference>)
CreateScriptFilesCompilation(string)
CreateWin32ManifestProvider()
CreateWorkspace()
Dispose()

Destroys the instance of the RoslynScriptProvider class.

Dispose(bool)
GenerateExpressionCode(string, bool)
GenerateGlobalCode(IList<IScriptGlobalItem>)
GetCompilationOptions()
GetDiagnostics(Compilation)
GetGlobalFileName()
GetLanguageName()
GetMemoryStream(byte[])
GetOutputKind()
GetParserOptions()
GetPlatform()
GetResourceName(string, string)
GetResourceNamespace(string)
GetSpecificDiagnosticOptions()
LoadAssemblyFromCache()
ParseCode(IList<SyntaxTree>, string, string)
ParseDocument(Document)
ReferencesDotNetCoreRuntime(out Version)

Detects version of the DotNET Core installed on the PC.

ResolveReferences()
SaveAssembly(byte[], byte[])