Class DeploymentCatalog
Discovers attributed parts in a XAP file, and provides methods for asynchronously downloading XAP files.
Inheritance
Implements
Inherited Members
Namespace: System.ComponentModel.Composition.Hosting
Assembly: System.ComponentModel.Composition.Initialization.dll
Syntax
public class DeploymentCatalog : ComposablePartCatalog, IEnumerable<ComposablePartDefinition>, IEnumerable, IDisposable, INotifyComposablePartCatalogChanged
Constructors
| Improve this Doc View SourceDeploymentCatalog()
Initializes a new instance of the DeploymentCatalog class using assemblies in the current XAP.
Declaration
public DeploymentCatalog()
DeploymentCatalog(String)
Initializes a new instance of the DeploymentCatalog class using the XAP file at the specified relative URI.
Declaration
[NotImplemented]
public DeploymentCatalog(string uriRelative)
Parameters
Type | Name | Description |
---|---|---|
System.String | uriRelative | The URI of the XAP file. |
DeploymentCatalog(Uri)
Initializes a new instance of the DeploymentCatalog class using the XAP file at the specified URI.
Declaration
[NotImplemented]
public DeploymentCatalog(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | The URI of the XAP file. |
Properties
| Improve this Doc View SourceParts
Gets all the parts contained in the catalog.
Declaration
public override IQueryable<ComposablePartDefinition> Parts { get; }
Property Value
Type | Description |
---|---|
System.Linq.IQueryable<System.ComponentModel.Composition.Primitives.ComposablePartDefinition> | A query enumerating all the parts contained in the catalog. |
Overrides
Uri
Gets the URI for the XAP file.
Declaration
public Uri Uri { get; }
Property Value
Type | Description |
---|---|
System.Uri |
Methods
| Improve this Doc View SourceCancelAsync()
Cancels the XAP file download in progress.
Declaration
[NotImplemented]
public void CancelAsync()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The method is called before DownloadAsync() or after the DownloadCompleted event has occurred. |
Dispose(Boolean)
Releases the unmanaged resources used by the DeploymentCatalog and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
DownloadAsync()
Begins downloading the XAP file associated with the DeploymentCatalog.
Declaration
[NotImplemented]
public void DownloadAsync()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This method is called more than once, or after the CancelAsync() method. |
GetExports(ImportDefinition)
Gets the export definitions that match the constraint expressed by the specified definition.
Declaration
public override IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> GetExports(ImportDefinition definition)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.Composition.Primitives.ImportDefinition | definition | The conditions of the System.ComponentModel.Composition.Primitives.ExportDefinition objects to be returned. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Tuple<System.ComponentModel.Composition.Primitives.ComposablePartDefinition, System.ComponentModel.Composition.Primitives.ExportDefinition>> | A collection of System.Tuple`2 objects containing the System.ComponentModel.Composition.Primitives.ExportDefinition objects and their associated System.ComponentModel.Composition.Primitives.ComposablePartDefinition objects for objects that match the constraint specified by definition. |
Overrides
OnChanged(ComposablePartCatalogChangeEventArgs)
Raises the Changed event.
Declaration
protected virtual void OnChanged(ComposablePartCatalogChangeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.Composition.Hosting.ComposablePartCatalogChangeEventArgs | e | A System.ComponentModel.Composition.Hosting.ComposablePartCatalogChangeEventArgs object that contains the event data. |
OnChanging(ComposablePartCatalogChangeEventArgs)
Raises the Changing event.
Declaration
protected virtual void OnChanging(ComposablePartCatalogChangeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.Composition.Hosting.ComposablePartCatalogChangeEventArgs | e | A System.ComponentModel.Composition.Hosting.ComposablePartCatalogChangeEventArgs object that contains the event data. |
OnDownloadCompleted(AsyncCompletedEventArgs)
Raises the DownloadCompleted event.
Declaration
protected virtual void OnDownloadCompleted(AsyncCompletedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.AsyncCompletedEventArgs | e | A System.ComponentModel.AsyncCompletedEventArgs object that contains the event data. |
OnDownloadProgressChanged(DownloadProgressChangedEventArgs)
Raises the DownloadProgressChanged event.
Declaration
protected virtual void OnDownloadProgressChanged(DownloadProgressChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Net.DownloadProgressChangedEventArgs | e | A System.Net.DownloadProgressChangedEventArgs object that contains the event data. |
Events
| Improve this Doc View SourceChanged
Occurs when the contents of the DeploymentCatalog have changed.
Declaration
public event EventHandler<ComposablePartCatalogChangeEventArgs> Changed
Event Type
Type | Description |
---|---|
System.EventHandler<System.ComponentModel.Composition.Hosting.ComposablePartCatalogChangeEventArgs> |
Changing
Occurs when the contents of the DeploymentCatalog are changing.
Declaration
public event EventHandler<ComposablePartCatalogChangeEventArgs> Changing
Event Type
Type | Description |
---|---|
System.EventHandler<System.ComponentModel.Composition.Hosting.ComposablePartCatalogChangeEventArgs> |
DownloadCompleted
Occurs when the XAP file has finished downloading, or there has been an error.
Declaration
[NotImplemented]
public event EventHandler<AsyncCompletedEventArgs> DownloadCompleted
Event Type
Type | Description |
---|---|
System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> |
DownloadProgressChanged
Occurs when the download progress of the XAP file changes.
Declaration
[NotImplemented]
public event EventHandler<DownloadProgressChangedEventArgs> DownloadProgressChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.Net.DownloadProgressChangedEventArgs> |