Table of Contents

Class ScriptSource

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

Provides methods and properties to work with script text, files or projects.

public class ScriptSource : IScriptSource, IScriptSourceBase, ICloneable, IEquatable<IScriptSource>
Inheritance
ScriptSource
Implements

Constructors

ScriptSource(IScriptRun)

Initializes a new instance of the ScriptSource class with specified script runner.

Properties

Changed

Gets or sets boolean value indicating if script source has been modified since last compilation.

Conditionals

Gets list of conditional compilation symbols.

Expression

Gets expression to evaluate.

Files

Gets list of files containing script to execute.

FrameworkPath

Gets location of .NET Framework assemblies.

HasExpression

Returns boolean value indicating whether ScriptSource contains expression to evaluate.

HasProject

Returns boolean value indicating whether ScriptSource is associated with the project.

HasScriptCode

Returns boolean value indicating whether ScriptSource contains script code to execute.

HasScriptFile

Returns boolean value indicating whether ScriptSource contains script file to execute.

Imports

Gets list of namespaces to be used in the script.

IsWpfProject

Returns boolean value indicating whether ScriptSource contains a Wpf project

Language

Returns script programming language.

ProjectFileName

Gets a file name of the Visual Studio project containing script files to execute.

ProjectName

Gets or sets name of the Visual Studio project containing script files to execute.

ProjectTargetFramework

Gets a TargetFramework related to the project stored in this script source.

Properties

Gets additional properties to be used in code generation.

References

Gets list of external assemblies referenced from the script.

Resources

Gets list of embedded resource files.

RootNamespace

Gets or sets name of the Visual Studio project containing script files to execute.

ScriptCode

Gets script code to execute.

ScriptFile

Gets single script file to execute.

ScriptRun
SearchPaths

Gets list of search directories to look for source files and referenced assemblies.

WpfResources

Gets list of wpf resource files.

Methods

Clone()

Creates a new object that is a copy of the current ScriptSource object.

Equals(IScriptSource)

Determines whether the specified IScriptSource is equal to the current ScriptSource.

FromExpression(string)

Loads script source from the expression.

FromScriptCode(string)

Loads script source from the script code.

FromScriptCode(string, string)

Loads script source from the script code.

FromScriptFile(string)

Loads script source from the script file.

FromScriptProject(string)

Loads script source from the Visual Studio project.

GetLastModifiedDate(string)

Gets file date time when script source was compiled.

HasBeenModified(IScriptSource)

Compares file modification dates against to other script source.

Reset()

Clears script source.

ResetProject()
WithDefaultReferences(ScriptTechnologyEnvironment, bool, bool)

Sets default assembly references to the script source.