Share via


IVsAsyncShellOpenDocument.GetProvisionalViewingStatusForFileAsync Method

Definition

Gets the provisional viewing status for a file.

public Microsoft.VisualStudio.Shell.Interop.IVsTask GetProvisionalViewingStatusForFileAsync (string fileName, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy? hierarchy, uint itemId, Guid logicalView);
abstract member GetProvisionalViewingStatusForFileAsync : string * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * Guid -> Microsoft.VisualStudio.Shell.Interop.IVsTask
Public Function GetProvisionalViewingStatusForFileAsync (fileName As String, hierarchy As IVsHierarchy, itemId As UInteger, logicalView As Guid) As IVsTask

Parameters

fileName
String

The name of the file.

hierarchy
IVsHierarchy

The hierarchy of the item.

itemId
UInt32

The item identifier of the item.

logicalView
Guid

The logical view to query.

Returns

A task representing the query operation. The result of the task is a member of the __VSPROVISIONALVIEWINGSTATUS enumeration that describes how the file can be opened in the preview tab. The default provisional viewing status is PVS_Disabled, but can be modified by the editor's "CommonPhysicalViewAttributes" registry value and the values under its "PhysicalViewAttributes" registry subkey.

Remarks

The physical view attributes – which declare if and how the physical view supports provisional viewing (that is, previewing) – are properties of the editor. In addition to physical view attributes, editors also declare what file types they can edit (for example, *.cs, *.xml, and so on) and the relative “rank” of the editor. Multiple editors can declare that they support the same file type and the environment then chooses the one with the highest rank to open the file.

This method must be accessed on the main thread.

Applies to