Table of Contents

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

FeedUri

InterpreterVersions

The range of versions of the script interpreter supported by the application.

public VersionRange? InterpreterVersions { get; set; }

Property Value

VersionRange

Methods

CreateCommand()

Creates a Command to launch this entry point.

public override Command CreateCommand()

Returns

Command

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(InterpretedScript?)

protected bool Equals(InterpretedScript? other)

Parameters

other InterpretedScript

Returns

bool

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 FileInfo

The file to analyze.

interpreter string

The name of the interpreter to search for (e.g. 'python').

Returns

bool

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 InterpretedScript

The left object

right InterpretedScript

The 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 InterpretedScript

The left object

right InterpretedScript

The right object

Returns

bool

true if the objects are not equal; otherwise, false.