Facilitates deterministic restoration of an IVsNewDocumentStateContext.
Inheritance Hierarchy
Object
  Microsoft.VisualStudio.PlatformUI.DisposableObject
    Microsoft.VisualStudio.Shell.NewDocumentStateScope
Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
Public Class NewDocumentStateScope _
    Inherits DisposableObject
public class NewDocumentStateScope : DisposableObject
public ref class NewDocumentStateScope : public DisposableObject
type NewDocumentStateScope =  
    class 
        inherit DisposableObject 
    end
public class NewDocumentStateScope extends DisposableObject
The NewDocumentStateScope type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| .gif) | NewDocumentStateScope(__VSNEWDOCUMENTSTATE, Guid) | Initializes a new instance of the NewDocumentStateScope class. | 
| .gif) | NewDocumentStateScope(__VSNEWDOCUMENTSTATE2, Guid) | Initializes a new instance of the NewDocumentStateScope class. | 
Top
Properties
| Name | Description | |
|---|---|---|
| .gif) | IsDisposed | Returns whether the object has been disposed once, which protects against double disposal. (Inherited from DisposableObject.) | 
Top
Methods
| Name | Description | |
|---|---|---|
| .gif) | Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from DisposableObject.) | 
| .gif) | Dispose(Boolean) | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Standard virtual overload for IDisposable pattern. (Inherited from DisposableObject.) | 
| .gif) | DisposeManagedResources | Allows derived classes to provide custom dispose handling for managed resources. (Inherited from DisposableObject.) | 
| .gif) | DisposeNativeResources | Disposes of the native resources. (Overrides DisposableObject.DisposeNativeResources().) | 
| .gif) | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | 
| .gif) | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from DisposableObject.) | 
| .gif) | GetHashCode | Serves as the default hash function. (Inherited from Object.) | 
| .gif) | GetType | Gets the Type of the current instance. (Inherited from Object.) | 
| .gif) | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | 
| .gif) | ThrowIfDisposed | Throws an ObjectDisposedException if this object has been disposed. (Inherited from DisposableObject.) | 
| .gif) | ToString | Returns a string that represents the current object. (Inherited from Object.) | 
Top
Events
| Name | Description | |
|---|---|---|
| .gif) | Disposing | Raised when the event is being disposed, that is, while it is still accessible. (Inherited from DisposableObject.) | 
Top
Remarks
To open a document in the Visual Studio preview tab, you can use an instance of this class in a using statement.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.