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
ITaskHandlerA callback object used when the user is to be informed about the progress of long-running operations such as downloads.
machineWide
boolApply 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
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
AppEntryThe application being integrated.
feed
FeedThe 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
AppEntryThe application being integrated.
feed
FeedThe 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 asaccessPoints
.- 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)
public AppEntry AddApp(string petName, Requirements requirements, Feed feed)
Parameters
petName
stringThe user-defined pet-name of the application.
requirements
RequirementsThe requirements describing the application to add.
feed
FeedThe feed providing additional metadata, capabilities, etc. for the application.
Returns
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)
public AppEntry AddApp(FeedTarget target)
Parameters
target
FeedTargetThe application to add.
Returns
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)
protected abstract AppEntry AddAppInternal(string petName, Requirements requirements, Feed feed)
Parameters
petName
stringThe user-defined pet-name of the application.
requirements
RequirementsThe requirements describing the application to add.
feed
FeedThe feed providing additional metadata, capabilities, etc. for the application.
Returns
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
AppEntryAn 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)
protected abstract AppEntry AddAppInternal(FeedTarget target)
Parameters
target
FeedTargetThe application to add.
Returns
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
AppEntryThe 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
AppEntryThe 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
AppEntryThe 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
AppEntryThe 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
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
AppEntryThe application entry to repair.
feed
FeedThe 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
AppEntryThe application entry to update.
feed
FeedThe 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
AppEntryThe application entry to update.
feed
FeedThe feed providing additional metadata, capabilities, etc. for the application.
requirements
RequirementsThe 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
AppEntryThe application entry to update.
feed
FeedThe feed providing additional metadata, capabilities, etc. for the application.
Exceptions
- KeyNotFoundException
An AccessPoint reference to a Capability is invalid.