Table of Contents

Class SnapshotDiff

Namespace
ZeroInstall.Publish.Capture
Assembly
ZeroInstall.Publish.dll

Represents the differences between two Snapshots. Extracts information about applications installed.

public class SnapshotDiff : Snapshot
Inheritance
SnapshotDiff
Inherited Members

Constructors

SnapshotDiff(Snapshot, Snapshot)

Determines which elements have been added to the system between two snapshots.

public SnapshotDiff(Snapshot before, Snapshot after)

Parameters

before Snapshot

The first snapshot taken.

after Snapshot

The second snapshot taken.

Remarks

Assumes that all internal arrays are sorted alphabetically.

Methods

CollectAutoPlays(CommandMapper, CapabilityList)

Collects data about AutoPlay handlers.

public void CollectAutoPlays(CommandMapper commandMapper, CapabilityList capabilities)

Parameters

commandMapper CommandMapper

Provides best-match command-line to Command mapping.

capabilities CapabilityList

The capability list to add the collected data to.

Exceptions

IOException

There was an error accessing the registry.

UnauthorizedAccessException

Read access to the registry was not permitted.

CollectContextMenus(CommandMapper, CapabilityList)

Collects data about context menu entries.

public void CollectContextMenus(CommandMapper commandMapper, CapabilityList capabilities)

Parameters

commandMapper CommandMapper

Provides best-match command-line to Command mapping.

capabilities CapabilityList

The capability list to add the collected data to.

Exceptions

IOException

There was an error accessing the registry.

UnauthorizedAccessException

Read access to the registry was not permitted.

CollectDefaultPrograms(CommandMapper, CapabilityList, ref string?)

Collects data about default programs.

public void CollectDefaultPrograms(CommandMapper commandMapper, CapabilityList capabilities, ref string? appName)

Parameters

commandMapper CommandMapper

Provides best-match command-line to Command mapping.

capabilities CapabilityList

The capability list to add the collected data to.

appName string

Is set to the name of the application as displayed to the user; unchanged if the name was not found.

Exceptions

IOException

There was an error accessing the registry.

UnauthorizedAccessException

Read access to the registry was not permitted.

CollectFileTypes(CommandMapper, CapabilityList)

Collects data about file types and also URL protocol handlers.

public void CollectFileTypes(CommandMapper commandMapper, CapabilityList capabilities)

Parameters

commandMapper CommandMapper

Provides best-match command-line to Command mapping.

capabilities CapabilityList

The capability list to add the collected data to.

Exceptions

IOException

There was an error accessing the registry.

UnauthorizedAccessException

Read access to the registry was not permitted.

CollectProtocolAssocs(CommandMapper, CapabilityList)

Collects data about well-known URL protocol handlers.

public void CollectProtocolAssocs(CommandMapper commandMapper, CapabilityList capabilities)

Parameters

commandMapper CommandMapper

Provides best-match command-line to Command mapping.

capabilities CapabilityList

The capability list to add the collected data to.

Exceptions

IOException

There was an error accessing the registry.

UnauthorizedAccessException

Read access to the registry was not permitted.

GetAppRegistration(CommandMapper, CapabilityList, ref string?, ref string?)

Retrieves data about registered applications.

public AppRegistration? GetAppRegistration(CommandMapper commandMapper, CapabilityList capabilities, ref string? appName, ref string? appDescription)

Parameters

commandMapper CommandMapper

Provides best-match command-line to Command mapping.

capabilities CapabilityList

The capability list to add the collected data to.

appName string

Is set to the name of the application as displayed to the user; unchanged if the name was not found.

appDescription string

Is set to a user-friendly description of the application; unchanged if the name was not found.

Returns

AppRegistration

Exceptions

IOException

There was an error accessing the registry.

UnauthorizedAccessException

Read access to the registry was not permitted.

GetInstallationDir()

Locates the directory into which the new application was installed.

public string GetInstallationDir()

Returns

string

Exceptions

InvalidOperationException

No installation directory was detected.