Class InterpretedScript
- Namespace
- ZeroInstall.Publish.EntryPoints
- Assembly
- ZeroInstall.Publish.dll
A plain text script that is executed by a runtime interpreter.
[Equatable]
public abstract class InterpretedScript : Candidate, IEquatable<Candidate>, IEquatable<InterpretedScript>
- Inheritance
-
InterpretedScript
- Implements
- Derived
- Inherited Members
Properties
InterpreterInterface
The interface URI of the interpreter to run the script.
protected abstract FeedUri InterpreterInterface { get; }
Property Value
InterpreterVersions
The range of versions of the script interpreter supported by the application.
public VersionRange? InterpreterVersions { get; set; }
Property Value
Methods
CreateCommand()
Creates a Command to launch this entry point.
public override Command CreateCommand()
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
Equals(InterpretedScript?)
protected bool Equals(InterpretedScript? other)
Parameters
other
InterpretedScript
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
HasShebang(FileInfo, string)
Determines whether a file is executable and has a shebang line pointing to a specific interpreter.
protected bool HasShebang(FileInfo file, string interpreter)
Parameters
file
FileInfoThe file to analyze.
interpreter
stringThe name of the interpreter to search for (e.g. 'python').
Returns
Operators
operator ==(InterpretedScript?, InterpretedScript?)
Indicates whether the object on the left is equal to the object on the right.
public static bool operator ==(InterpretedScript? left, InterpretedScript? right)
Parameters
left
InterpretedScriptThe left object
right
InterpretedScriptThe right object
Returns
- bool
true if the objects are equal; otherwise, false.
operator !=(InterpretedScript?, InterpretedScript?)
Indicates whether the object on the left is not equal to the object on the right.
public static bool operator !=(InterpretedScript? left, InterpretedScript? right)
Parameters
left
InterpretedScriptThe left object
right
InterpretedScriptThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.