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
Properties
DiscoveryErrors
public ImmutableList<PartDiscoveryException> DiscoveryErrors { get; }
Property Value
Parts
public ImmutableHashSet<ComposablePartDefinition> Parts { get; }
Property Value
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.