Class EnvironmentBinding
Make a chosen Implementation available by setting environment variables.
Implements
Inherited Members
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public sealed class EnvironmentBinding : Binding
Constructors
EnvironmentBinding()
Declaration
public EnvironmentBinding()
Properties
Default
If the environment variable is not currently set then this value is used for prepending or appending.
Declaration
public string Default { get; set; }
Property Value
Type | Description |
---|---|
String |
Insert
The relative path of the item within the implementation to insert into the variable value. Use .
to publish the root directory.
Declaration
public string Insert { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
If this is set Value must be null
.
Mode
Declaration
public EnvironmentMode Mode { get; set; }
Property Value
Type | Description |
---|---|
EnvironmentMode |
Name
The name of the environment variable.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
Separator
Overrides the default separator character (":" on POSIX and ";" on Windows).
Declaration
public string Separator { get; set; }
Property Value
Type | Description |
---|---|
String |
Value
A static value to set the variable to.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
If this is set Insert must be null
.
Methods
Clone()
Creates a deep copy of this EnvironmentBinding instance.
Declaration
public override Binding Clone()
Returns
Type | Description |
---|---|
Binding | The new copy of the EnvironmentBinding. |
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(EnvironmentBinding)
Declaration
public bool Equals(EnvironmentBinding other)
Parameters
Type | Name | Description |
---|---|---|
EnvironmentBinding | other |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
Normalize()
Converts legacy elements, sets default values, etc..
Declaration
public override void Normalize()
Overrides
Exceptions
Type | Condition |
---|---|
InvalidDataException | A required property is not set or invalid. |
ToString()
Returns the binding in the form "Name = Value (Mode, Default)". Not safe for parsing!
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Operators
Equality(EnvironmentBinding, EnvironmentBinding)
Indicates whether the object on the left is equal to the object on the right.
Declaration
public static bool operator ==(EnvironmentBinding left, EnvironmentBinding right)
Parameters
Type | Name | Description |
---|---|---|
EnvironmentBinding | left | The left object |
EnvironmentBinding | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal; otherwise, false. |
Inequality(EnvironmentBinding, EnvironmentBinding)
Indicates whether the object on the left is not equal to the object on the right.
Declaration
public static bool operator !=(EnvironmentBinding left, EnvironmentBinding right)
Parameters
Type | Name | Description |
---|---|---|
EnvironmentBinding | left | The left object |
EnvironmentBinding | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are not equal; otherwise, false. |