CompositionContainer.ReleaseExport Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ReleaseExport(Export) |
Releases the specified Export object from the CompositionContainer. |
ReleaseExport<T>(Lazy<T>) |
Removes the specified export from composition and releases its resources if possible. |
ReleaseExport(Export)
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
Releases the specified Export object from the CompositionContainer.
public:
void ReleaseExport(System::ComponentModel::Composition::Primitives::Export ^ export);
public void ReleaseExport (System.ComponentModel.Composition.Primitives.Export export);
member this.ReleaseExport : System.ComponentModel.Composition.Primitives.Export -> unit
Public Sub ReleaseExport (export As Export)
Parameters
Exceptions
export
is null
.
Remarks
The behavior of this method may vary depending on the implementation of the ExportProvider that produced the Export instance. As a rule, non-shared exports should be detached from the container.
For example, the CatalogExportProvider will only release an Export if it comes from a ComposablePart that was constructed under a NonShared context. Release in this context means walking the dependency chain of the Export objects, detaching references from the container and calling Dispose
on the ComposablePart objects as needed. If the Export was constructed under a Shared context the CatalogExportProvider will do nothing, as the specified Export may being used by other requestors. Those will only be detached when the container is itself disposed.
Applies to
ReleaseExport<T>(Lazy<T>)
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
Removes the specified export from composition and releases its resources if possible.
public:
generic <typename T>
void ReleaseExport(Lazy<T> ^ export);
public void ReleaseExport<T> (Lazy<T> export);
member this.ReleaseExport : Lazy<'T> -> unit
Public Sub ReleaseExport(Of T) (export As Lazy(Of T))
Type Parameters
- T
The type of the export.
Parameters
- export
- Lazy<T>
An indirect reference to the export to remove.
Exceptions
export
is null
.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기