Table of Contents

Class IntegrationManagerBase

Namespace
ZeroInstall.DesktopIntegration
Assembly
ZeroInstall.DesktopIntegration.dll

Base class for IIntegrationManager implementations using template methods.

[MustDisposeResource]
public abstract class IntegrationManagerBase : ManagerBase, IDisposable, IIntegrationManager
Inheritance
IntegrationManagerBase
Implements
Derived
Inherited Members

Constructors

IntegrationManagerBase(ITaskHandler, bool)

Base class for IIntegrationManager implementations using template methods.

protected IntegrationManagerBase(ITaskHandler handler, bool machineWide = false)

Parameters

handler ITaskHandler

A callback object used when the user is to be informed about the progress of long-running operations such as downloads.

machineWide bool

Apply operations machine-wide instead of just for the current user.

Exceptions

IOException

A problem occurred while accessing the AppList file.

UnauthorizedAccessException

Read or write access to the AppList file is not permitted or another desktop integration class is currently active.

InvalidDataException

A problem occurred while deserializing an XML file.

Properties

AppList

Stores a list of applications and their desktop integrations. Only use for read-access externally! Use this class' methods for any modifications.

public AppList AppList { get; protected init; }

Property Value

AppList

Exceptions

IOException

A problem occurred while accessing the AppList file.

UnauthorizedAccessException

Read or write access to the AppList file is not permitted or another desktop integration class is currently active.

InvalidDataException

A problem occurred while deserializing an XML file.

Methods

AddAccessPoints(AppEntry, Feed, IEnumerable<AccessPoint>)

Applies AccessPoints for an application.

public void AddAccessPoints(AppEntry appEntry, Feed feed, IEnumerable<AccessPoint> accessPoints)

Parameters

appEntry AppEntry

The application being integrated.

feed Feed

The feed providing additional metadata, icons, etc. for the application.

accessPoints IEnumerable<AccessPoint>

The access points to apply.

Exceptions

OperationCanceledException

The user canceled the task.

ConflictException

One or more of the accessPoints would cause a conflict with the existing AccessPoints in AppList.

WebException

A problem occurred while downloading additional data (such as icons).

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

AddAccessPointsInternal(AppEntry, Feed, IReadOnlyCollection<AccessPoint>)

Applies AccessPoints for an application.

protected abstract void AddAccessPointsInternal(AppEntry appEntry, Feed feed, IReadOnlyCollection<AccessPoint> accessPoints)

Parameters

appEntry AppEntry

The application being integrated.

feed Feed

The feed providing additional metadata, icons, etc. for the application.

accessPoints IReadOnlyCollection<AccessPoint>

The access points to apply.

Exceptions

ArgumentException

Entries from appEntry is the same reference as accessPoints.

OperationCanceledException

The user canceled the task.

KeyNotFoundException

An AccessPoint reference to a Capability is invalid.

ConflictException

One or more of the accessPoints would cause a conflict with the existing AccessPoints in AppList.

WebException

A problem occurred while downloading additional data (such as icons).

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

AddApp(string, Requirements, Feed)

Creates a new named AppEntry and adds it to the AppList.

public AppEntry AddApp(string petName, Requirements requirements, Feed feed)

Parameters

petName string

The user-defined pet-name of the application.

requirements Requirements

The requirements describing the application to add.

feed Feed

The feed providing additional metadata, capabilities, etc. for the application.

Returns

AppEntry

The newly created application entry (already added to AppList).

Exceptions

InvalidOperationException

An application with the same petName is already in the list.

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

AddApp(FeedTarget)

Creates a new unnamed AppEntry and adds it to the AppList.

public AppEntry AddApp(FeedTarget target)

Parameters

target FeedTarget

The application to add.

Returns

AppEntry

The newly created application entry (already added to AppList).

Exceptions

InvalidOperationException

The application is already in the list.

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

AddAppInternal(string, Requirements, Feed)

Creates a new named AppEntry and adds it to the AppList.

protected abstract AppEntry AddAppInternal(string petName, Requirements requirements, Feed feed)

Parameters

petName string

The user-defined pet-name of the application.

requirements Requirements

The requirements describing the application to add.

feed Feed

The feed providing additional metadata, capabilities, etc. for the application.

Returns

AppEntry

The newly created application entry (already added to AppList).

Exceptions

InvalidOperationException

An application with the same petName is already in the list.

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

AddAppInternal(AppEntry, Converter<FeedUri, Feed>)

Creates a new AppEntry based on an existing prototype (applying any AccessPoints) and adds it to the AppList.

protected abstract void AddAppInternal(AppEntry prototype, Converter<FeedUri, Feed> feedRetriever)

Parameters

prototype AppEntry

An existing AppEntry to use as a prototype.

feedRetriever Converter<FeedUri, Feed>

Callback method used to retrieve additional Feeds on demand.

Exceptions

IOException

A problem occurred while accessing the AppList file.

UnauthorizedAccessException

Read or write access to the AppList file is not permitted or another desktop integration class is currently active.

InvalidDataException

A problem occurred while deserializing an XML file.

AddAppInternal(FeedTarget)

Creates a new unnamed AppEntry and adds it to the AppList.

protected abstract AppEntry AddAppInternal(FeedTarget target)

Parameters

target FeedTarget

The application to add.

Returns

AppEntry

The newly created application entry (already added to AppList).

Exceptions

InvalidOperationException

The application is already in the list.

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

Finish()

To be called after integration operations have been completed to inform the desktop environment and save the AppList.

protected abstract void Finish()

Exceptions

IOException

A problem occurred while accessing the AppList file.

UnauthorizedAccessException

Read or write access to the AppList file is not permitted or another desktop integration class is currently active.

InvalidDataException

A problem occurred while deserializing an XML file.

RemoveAccessPoints(AppEntry, IEnumerable<AccessPoint>)

Removes already applied AccessPoints for an application.

public void RemoveAccessPoints(AppEntry appEntry, IEnumerable<AccessPoint> accessPoints)

Parameters

appEntry AppEntry

The application being integrated.

accessPoints IEnumerable<AccessPoint>

The access points to unapply.

Exceptions

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

RemoveAccessPointsInternal(AppEntry, IEnumerable<AccessPoint>)

Removes already applied AccessPoints for an application.

protected abstract void RemoveAccessPointsInternal(AppEntry appEntry, IEnumerable<AccessPoint> accessPoints)

Parameters

appEntry AppEntry

The AppEntry containing the accessPoints.

accessPoints IEnumerable<AccessPoint>

The access points to unapply.

Exceptions

KeyNotFoundException

An AccessPoint reference to a Capability is invalid.

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

RemoveApp(AppEntry)

Removes an AppEntry from the AppList while unapplying any remaining AccessPoints.

public void RemoveApp(AppEntry appEntry)

Parameters

appEntry AppEntry

The application to remove.

Exceptions

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

RemoveAppInternal(AppEntry)

Removes an AppEntry from the AppList while unapplying any remaining AccessPoints.

protected abstract void RemoveAppInternal(AppEntry appEntry)

Parameters

appEntry AppEntry

The application to remove.

Exceptions

KeyNotFoundException

An AccessPoint reference to a Capability is invalid.

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

Repair(Converter<FeedUri, Feed>)

Reapplies all AccessPoints for all AppEntrys.

public void Repair(Converter<FeedUri, Feed> feedRetriever)

Parameters

feedRetriever Converter<FeedUri, Feed>

Callback method used to retrieve additional Feeds on demand.

Exceptions

OperationCanceledException

The user canceled the task.

ConflictException

The AppList has inner conflicts.

WebException

A problem occurred while downloading additional data (such as icons).

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

RepairAppInternal(AppEntry, Feed)

Reapplies all AccessPoints for a specific AppEntry.

protected abstract void RepairAppInternal(AppEntry appEntry, Feed feed)

Parameters

appEntry AppEntry

The application entry to repair.

feed Feed

The feed providing additional metadata, capabilities, etc. for the application.

Exceptions

OperationCanceledException

The user canceled the task.

ConflictException

appEntry conflicts with the rest of the AppList.

WebException

A problem occurred while downloading additional data (such as icons).

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

UpdateApp(AppEntry, Feed)

Updates an AppEntry with new metadata and capabilities from a Feed. This may unapply and remove some existing AccessPoints.

public void UpdateApp(AppEntry appEntry, Feed feed)

Parameters

appEntry AppEntry

The application entry to update.

feed Feed

The feed providing additional metadata, capabilities, etc. for the application.

Exceptions

IOException

A problem occurred while accessing the AppList file.

UnauthorizedAccessException

Read or write access to the AppList file is not permitted or another desktop integration class is currently active.

InvalidDataException

A problem occurred while deserializing an XML file.

UpdateApp(AppEntry, Feed, Requirements)

Updates a named AppEntry with new Requirements.

public void UpdateApp(AppEntry appEntry, Feed feed, Requirements requirements)

Parameters

appEntry AppEntry

The application entry to update.

feed Feed

The feed providing additional metadata, capabilities, etc. for the application.

requirements Requirements

The new requirements to apply to the app.

Exceptions

IOException

A problem occurred while accessing the AppList file.

UnauthorizedAccessException

Read or write access to the AppList file is not permitted or another desktop integration class is currently active.

InvalidDataException

A problem occurred while deserializing an XML file.

UpdateAppInternal(AppEntry, Feed)

Updates an AppEntry with new metadata and capabilities from a Feed. This may unapply and remove some existing AccessPoints.

protected abstract void UpdateAppInternal(AppEntry appEntry, Feed feed)

Parameters

appEntry AppEntry

The application entry to update.

feed Feed

The feed providing additional metadata, capabilities, etc. for the application.

Exceptions

KeyNotFoundException

An AccessPoint reference to a Capability is invalid.