Class IntegrationManagerBase
Base class for IIntegrationManager implementations using template methods.
Inherited Members
Namespace: ZeroInstall.DesktopIntegration
Assembly: ZeroInstall.DesktopIntegration.dll
Syntax
public abstract class IntegrationManagerBase : ManagerBase, IIntegrationManager
Constructors
IntegrationManagerBase(ITaskHandler, Boolean)
Creates a new integration manager.
Declaration
protected IntegrationManagerBase(ITaskHandler handler, bool machineWide = false)
Parameters
Type | Name | Description |
---|---|---|
ITaskHandler | handler | A callback object used when the the user is to be informed about the progress of long-running operations such as downloads. |
Boolean | machineWide | Apply operations machine-wide instead of just for the current user. |
Exceptions
Type | Condition |
---|---|
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.
Declaration
public AppList AppList { get; protected set; }
Property Value
Type | Description |
---|---|
AppList |
Methods
AddAccessPoints(AppEntry, Feed, IEnumerable<AccessPoint>)
Applies AccessPoints for an application.
Declaration
public void AddAccessPoints(AppEntry appEntry, Feed feed, IEnumerable<AccessPoint> accessPoints)
Parameters
Type | Name | Description |
---|---|---|
AppEntry | appEntry | The application being integrated. |
Feed | feed | The feed providing additional metadata, icons, etc. for the application. |
IEnumerable<AccessPoint> | accessPoints | The access points to apply. |
Exceptions
Type | Condition |
---|---|
OperationCanceledException | The user canceled the task. |
ConflictException | One or more of the |
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.
Declaration
protected abstract void AddAccessPointsInternal(AppEntry appEntry, Feed feed, IReadOnlyCollection<AccessPoint> accessPoints)
Parameters
Type | Name | Description |
---|---|---|
AppEntry | appEntry | The application being integrated. |
Feed | feed | The feed providing additional metadata, icons, etc. for the application. |
IReadOnlyCollection<AccessPoint> | accessPoints | The access points to apply. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Entries from |
OperationCanceledException | The user canceled the task. |
KeyNotFoundException | An AccessPoint reference to a Capability is invalid. |
ConflictException | One or more of the |
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)
Declaration
public AppEntry AddApp(string petName, Requirements requirements, Feed feed)
Parameters
Type | Name | Description |
---|---|---|
String | petName | 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
Type | Description |
---|---|
AppEntry | The newly created application entry (already added to AppList). |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | An application with the same |
IOException | A problem occurred while writing to the filesystem or registry. |
UnauthorizedAccessException | Write access to the filesystem or registry is not permitted. |
AddApp(FeedTarget)
Declaration
public AppEntry AddApp(FeedTarget target)
Parameters
Type | Name | Description |
---|---|---|
FeedTarget | target | The application to add. |
Returns
Type | Description |
---|---|
AppEntry | The newly created application entry (already added to AppList). |
Exceptions
Type | Condition |
---|---|
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)
Declaration
protected abstract AppEntry AddAppInternal(string petName, Requirements requirements, Feed feed)
Parameters
Type | Name | Description |
---|---|---|
String | petName | 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
Type | Description |
---|---|
AppEntry | The newly created application entry (already added to AppList). |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | An application with the same |
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.
Declaration
protected abstract void AddAppInternal(AppEntry prototype, Converter<FeedUri, Feed> feedRetriever)
Parameters
Type | Name | Description |
---|---|---|
AppEntry | prototype | An existing AppEntry to use as a prototype. |
Converter<FeedUri, Feed> | feedRetriever | Callback method used to retrieve additional Feeds on demand. |
AddAppInternal(FeedTarget)
Declaration
protected abstract AppEntry AddAppInternal(FeedTarget target)
Parameters
Type | Name | Description |
---|---|---|
FeedTarget | target | The application to add. |
Returns
Type | Description |
---|---|
AppEntry | The newly created application entry (already added to AppList). |
Exceptions
Type | Condition |
---|---|
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.
Declaration
protected abstract void Finish()
RemoveAccessPoints(AppEntry, IEnumerable<AccessPoint>)
Removes already applied AccessPoints for an application.
Declaration
public void RemoveAccessPoints(AppEntry appEntry, IEnumerable<AccessPoint> accessPoints)
Parameters
Type | Name | Description |
---|---|---|
AppEntry | appEntry | The application being integrated. |
IEnumerable<AccessPoint> | accessPoints | The access points to unapply. |
Exceptions
Type | Condition |
---|---|
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.
Declaration
protected abstract void RemoveAccessPointsInternal(AppEntry appEntry, IEnumerable<AccessPoint> accessPoints)
Parameters
Type | Name | Description |
---|---|---|
AppEntry | appEntry | The AppEntry containing the |
IEnumerable<AccessPoint> | accessPoints | The access points to unapply. |
Exceptions
Type | Condition |
---|---|
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.
Declaration
public void RemoveApp(AppEntry appEntry)
Parameters
Type | Name | Description |
---|---|---|
AppEntry | appEntry | The application to remove. |
Exceptions
Type | Condition |
---|---|
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.
Declaration
protected abstract void RemoveAppInternal(AppEntry appEntry)
Parameters
Type | Name | Description |
---|---|---|
AppEntry | appEntry | The application to remove. |
Exceptions
Type | Condition |
---|---|
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.
Declaration
public void Repair(Converter<FeedUri, Feed> feedRetriever)
Parameters
Type | Name | Description |
---|---|---|
Converter<FeedUri, Feed> | feedRetriever | Callback method used to retrieve additional Feeds on demand. |
Exceptions
Type | Condition |
---|---|
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.
Declaration
protected abstract void RepairAppInternal(AppEntry appEntry, Feed feed)
Parameters
Type | Name | Description |
---|---|---|
AppEntry | appEntry | The application entry to repair. |
Feed | feed | The feed providing additional metadata, capabilities, etc. for the application. |
Exceptions
Type | Condition |
---|---|
OperationCanceledException | The user canceled the task. |
ConflictException |
|
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.
Declaration
public void UpdateApp(AppEntry appEntry, Feed feed)
Parameters
Type | Name | Description |
---|---|---|
AppEntry | appEntry | The application entry to update. |
Feed | feed | The feed providing additional metadata, capabilities, etc. for the application. |
UpdateApp(AppEntry, Feed, Requirements)
Updates a named AppEntry with new Requirements.
Declaration
public void UpdateApp(AppEntry appEntry, Feed feed, Requirements requirements)
Parameters
Type | Name | Description |
---|---|---|
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. |
UpdateAppInternal(AppEntry, Feed)
Updates an AppEntry with new metadata and capabilities from a Feed. This may unapply and remove some existing AccessPoints.
Declaration
protected abstract void UpdateAppInternal(AppEntry appEntry, Feed feed)
Parameters
Type | Name | Description |
---|---|---|
AppEntry | appEntry | The application entry to update. |
Feed | feed | The feed providing additional metadata, capabilities, etc. for the application. |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | An AccessPoint reference to a Capability is invalid. |
Explicit Interface Implementations
IIntegrationManager.get_MachineWide()
Declaration
bool IIntegrationManager.get_MachineWide()
Returns
Type | Description |
---|---|
Boolean |