Table of Contents

Class DiscoveredParts

Namespace
Microsoft.VisualStudio.Composition
Assembly
Microsoft.VisualStudio.Composition.dll
public class DiscoveredParts
Inheritance
DiscoveredParts
Inherited Members

Constructors

DiscoveredParts(IEnumerable<ComposablePartDefinition>, IEnumerable<PartDiscoveryException>)

public DiscoveredParts(IEnumerable<ComposablePartDefinition> parts, IEnumerable<PartDiscoveryException> discoveryErrors)

Parameters

parts IEnumerable<ComposablePartDefinition>
discoveryErrors IEnumerable<PartDiscoveryException>

Fields

Empty

public static readonly DiscoveredParts Empty

Field Value

DiscoveredParts

Properties

DiscoveryErrors

public ImmutableList<PartDiscoveryException> DiscoveryErrors { get; }

Property Value

ImmutableList<PartDiscoveryException>

Parts

public ImmutableHashSet<ComposablePartDefinition> Parts { get; }

Property Value

ImmutableHashSet<ComposablePartDefinition>

Methods

ThrowOnErrors()

Returns the discovered parts if no errors occurred, otherwise throws an exception describing any discovery failures.

public DiscoveredParts ThrowOnErrors()

Returns

DiscoveredParts

This discovery result.

Remarks

This method returns this so that it may be used in a 'fluent API' expression.

Exceptions

CompositionFailedException

Thrown if DiscoveryErrors is non-empty.