Show / Hide Table of Contents

Class Config

User settings controlling network behaviour, solving, etc..

Inheritance
Object
Config
Implements
IEnumerable<KeyValuePair<String, String>>
IEnumerable
ICloneable<Config>
IEquatable<Config>
Namespace: ZeroInstall.Store.Configuration
Assembly: ZeroInstall.Store.dll
Syntax
public sealed class Config : Object

Constructors

Config()

Creates a new configuration with default values set.

Declaration
public Config()

Fields

DefaultExternalSolverUri

The default value for ExternalSolverUri.

Declaration
public const string DefaultExternalSolverUri = "https://apps.0install.net/0install/0install-ocaml.xml"
Field Value
Type Description
String

DefaultFeedMirror

The default value for FeedMirror.

Declaration
public const string DefaultFeedMirror = "https://roscidus.com/0mirror"
Field Value
Type Description
String

DefaultKeyInfoServer

The default value for KeyInfoServer.

Declaration
public const string DefaultKeyInfoServer = "https://keylookup.0install.net/"
Field Value
Type Description
String

DefaultMaxParallelDownloads

The default value for MaxParallelDownloads.

Declaration
public const int DefaultMaxParallelDownloads = 4
Field Value
Type Description
Int32

DefaultSelfUpdateUri

The default value for SelfUpdateUri.

Declaration
public const string DefaultSelfUpdateUri = "https://apps.0install.net/0install/0install-dotnet.xml"
Field Value
Type Description
String

DefaultSyncServer

The default value for SyncServer.

Declaration
public const string DefaultSyncServer = "https://0install.de/sync/"
Field Value
Type Description
String

Properties

AutoApproveKeys

Automatically approve keys known by the KeyInfoServer and seen the first time a feed is fetched.

Declaration
public bool AutoApproveKeys { get; set; }
Property Value
Type Description
Boolean

EffectiveNetworkUse

Same as NetworkUse, except when there the internet connection is metered (capped at Minimal) or unavailable (capped at Offline).

Declaration
public NetworkLevel EffectiveNetworkUse { get; }
Property Value
Type Description
NetworkLevel

ExternalSolverUri

The feed URI used to get the external solver. Set to empty to deactivate use of external solver.

Declaration
public FeedUri ExternalSolverUri { get; set; }
Property Value
Type Description
FeedUri

FeedMirror

The mirror server used to provide feeds when the original server is unavailable. Set to empty to deactivate use of feed mirror.

Declaration
public FeedUri FeedMirror { get; set; }
Property Value
Type Description
FeedUri

Freshness

The maximum age a cached Feed may have until it is considered stale (needs to be updated).

Declaration
public TimeSpan Freshness { get; set; }
Property Value
Type Description
TimeSpan

HelpWithTesting

Always prefer the newest versions, even if they have not been marked as Stable yet.

Declaration
public bool HelpWithTesting { get; set; }
Property Value
Type Description
Boolean

InitialTab

The initial tab to show in GUI representations.

Declaration
public ConfigTab InitialTab { get; set; }
Property Value
Type Description
ConfigTab

IsSyncConfigured

Indicates whether the sync-related configuration is complete.

Declaration
public bool IsSyncConfigured { get; }
Property Value
Type Description
Boolean

KeyInfoServer

The key information server used to get information about who signed a feed. Set to empty to deactivate use of key information server.

Declaration
public FeedUri KeyInfoServer { get; set; }
Property Value
Type Description
FeedUri

MaxParallelDownloads

Maximum number of Implementations to download in parallel.

Declaration
public int MaxParallelDownloads { get; set; }
Property Value
Type Description
Int32

NetworkUse

Controls how liberally network access is attempted.

Declaration
public NetworkLevel NetworkUse { get; set; }
Property Value
Type Description
NetworkLevel

SelfUpdateUri

The feed URI used to search for updates for Zero Install itself. Set to empty to deactivate self-update.

Declaration
public FeedUri SelfUpdateUri { get; set; }
Property Value
Type Description
FeedUri

SyncCryptoKey

The local key used to encrypt data before sending it to the SyncServer.

Declaration
public string SyncCryptoKey { get; set; }
Property Value
Type Description
String

SyncServer

The sync server used to synchronize your app list between multiple computers.

Declaration
public FeedUri SyncServer { get; set; }
Property Value
Type Description
FeedUri
See Also
SyncServerUsername
SyncServerPassword

SyncServerPassword

The password to authenticate with against the SyncServer.

Declaration
public string SyncServerPassword { get; set; }
Property Value
Type Description
String
See Also
SyncServer
SyncServerUsername

SyncServerUsername

The username to authenticate with against the SyncServer.

Declaration
public string SyncServerUsername { get; set; }
Property Value
Type Description
String
See Also
SyncServer
SyncServerPassword

Methods

Clone()

Creates a deep copy of this Config instance.

Declaration
public Config Clone()
Returns
Type Description
Config

The new copy of the Config.

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean

Equals(Config)

Declaration
public bool Equals(Config other)
Parameters
Type Name Description
Config other
Returns
Type Description
Boolean

GetEnumerator()

Declaration
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
Returns
Type Description
IEnumerator<KeyValuePair<String, String>>

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

GetOption(String)

Retrieves the string representation of an option identified by a key.

Declaration
public string GetOption(string key)
Parameters
Type Name Description
String key

The key of the option to retrieve.

Returns
Type Description
String

The string representation of the the option.

Exceptions
Type Condition
KeyNotFoundException

key is invalid.

IsOptionLocked(String)

Determines whether an option is locked by a group policy.

Declaration
public static bool IsOptionLocked(string key)
Parameters
Type Name Description
String key

The key of the option to check.

Returns
Type Description
Boolean

Load()

Aggregates the settings from all applicable INI files listed by GetLoadConfigPaths(String, Boolean, String[]).

Declaration
public static Config Load()
Returns
Type Description
Config

The loaded Config.

Exceptions
Type Condition
IOException

A problem occurred while reading the file.

UnauthorizedAccessException

Read access to the file is not permitted.

InvalidDataException

A problem occurred while deserializing the config data.

Load(String)

Loads the settings from a single INI file.

Declaration
public static Config Load(string path)
Parameters
Type Name Description
String path
Returns
Type Description
Config

The loaded Config.

Exceptions
Type Condition
IOException

A problem occurred while reading the file.

UnauthorizedAccessException

Read access to the file is not permitted.

InvalidDataException

A problem occurred while deserializing the config data.

LoadSafe()

Tries to load the Config. Automatically falls back to default values on errors.

Declaration
public static Config LoadSafe()
Returns
Type Description
Config

The loaded Config or default Config if there was a problem.

ResetOption(String)

Resets an option identified by a key to its default value.

Declaration
public void ResetOption(string key)
Parameters
Type Name Description
String key

The key of the option to reset.

Exceptions
Type Condition
KeyNotFoundException

key is invalid.

Save()

Saves the settings to an INI file in the default location in the user profile.

Declaration
public void Save()
Remarks

This method performs an atomic write operation when possible.

Exceptions
Type Condition
IOException

A problem occurred while writing the file.

UnauthorizedAccessException

Write access to the file is not permitted.

Save(String)

Saves the settings to an INI file.

Declaration
public void Save(string path)
Parameters
Type Name Description
String path
Remarks

This method performs an atomic write operation when possible.

Exceptions
Type Condition
IOException

A problem occurred while writing the file.

UnauthorizedAccessException

Write access to the file is not permitted.

SetOption(String, String)

Sets an option identified by a key.

Declaration
public void SetOption(string key, string value)
Parameters
Type Name Description
String key

The key of the option to set.

String value

A string representation of the option.

Exceptions
Type Condition
KeyNotFoundException

key is invalid.

FormatException

value is invalid.

UnauthorizedAccessException

This option is controlled by a group policy and can therefore not be modified.

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
ICloneable<T>
System.IEquatable<T>
In This Article
Back to top Copyright Bastian Eicher et al