Class ScriptSource
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.
- 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.
- ModulesSearchPaths
Gets list of search directories to look for Python modules.
- 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.
- ReferencedFrameworks
Gets or sets a combination of referenced library frameworks.
- References
Gets list of external assemblies referenced from the script.
- ReferencesSearchPaths
Gets list of search directories to look for assembly references.
- ScriptCode
Gets script code to execute.
- ScriptFile
Gets single script file to execute.
- StartupFile
When implemented by a class, gets or sets startup Python script file to be executed on script run. When this property is set, the only file that is executed is the StartupFile. When this property is not set, all the script files are executed in order they are specified.
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 currentScriptSource
.
- 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.