Freigeben über


IUIThreadOperationContext Interface

Definition

Represents a context of executing potentially long running operation on the UI thread, which enables shared two way cancellability and wait indication.

public interface class IUIThreadOperationContext : IDisposable, Microsoft::VisualStudio::Utilities::IPropertyOwner
public interface IUIThreadOperationContext : IDisposable, Microsoft.VisualStudio.Utilities.IPropertyOwner
type IUIThreadOperationContext = interface
    interface IPropertyOwner
    interface IDisposable
Public Interface IUIThreadOperationContext
Implements IDisposable, IPropertyOwner
Derived
Implements

Remarks

Instances implementing this interface are produced by IUIThreadOperationExecutor MEF component.

Properties

AllowCancellation

Gets whether the operation can be cancelled.

Description

Gets user readable operation description, composed of initial context description and descriptions of all currently added scopes.

Properties

The collection of properties controlled by the property owner.

(Inherited from IPropertyOwner)
Scopes

Gets current list of IUIThreadOperationScopes in this context.

UserCancellationToken

Cancellation token that allows user to cancel the operation unless the operation is not cancellable.

Methods

AddScope(Boolean, String)

Adds a UI thread operation scope with its own two way cancellability, description and progress tracker. The scope is removed from the context on dispose.

TakeOwnership()

Allows a component to take full ownership over this UI thread operation, for example when it shows its own modal UI dialog and handles cancellability through that dialog instead.

Applies to