XmlEditingScope Class
Represents a change to the XmlStore.
Namespace: Microsoft.VisualStudio.XmlEditor
Assembly: Microsoft.VisualStudio.XmlEditor (in Microsoft.VisualStudio.XmlEditor.dll)
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.XmlEditor.XmlEditingScope
Syntax
[CLSCompliantAttribute(false)]
public abstract class XmlEditingScope : IDisposable
[CLSCompliantAttribute(false)]
public ref class XmlEditingScope abstract : IDisposable
[<AbstractClass>]
[<CLSCompliantAttribute(false)>]
type XmlEditingScope =
class
interface IDisposable
end
<CLSCompliantAttribute(False)>
Public MustInherit Class XmlEditingScope
Implements IDisposable
Constructors
Name | Description | |
---|---|---|
XmlEditingScope() | Initializes a new instance of the XmlEditingScope class. |
Properties
Name | Description | |
---|---|---|
IsUndo | Returns a boolean value indicating whether this XmlEditingScope is the result of an Undo or Redo operation. |
|
Name | Gets the name provided in XmlEditingScope. |
|
Parent | Returns the parent object if this XmlEditingScope has a parent. |
|
Status | Returns the status of this XmlEditingScope. |
|
Store | Gets the XmlStore instance that created this XmlEditingScope. |
|
UndoScope | Returns the original XmlEditingScope that created the undo unit if this XmlEditingScope comes from the UndoRedoCompleted event. Returns null in other cases. |
|
UserState | Gets the state object that was provided to the M:Microsoft.VisualStudio.XmlEditor.XmlStore.BeginEditingScope method. |
Methods
Name | Description | |
---|---|---|
Changes(XmlModel) | Returns a list of all pending XmlModelChange objects for the specified model. |
|
Changes(XmlStore) | Returns a list of all pending XmlModelChange objects for the spcified XmlStore. |
|
Complete() | Completes all edits that were made while this XmlEditingScope object was active on any of the XmlModel objects in the associated XmlStore. This method pushes the changes to the underlying IVsTextLines buffers, and adds an undo unit to the IOleUndoManager provided to the associated XmlStore instance. |
|
Dispose() | Releases all resources used by the current instance of the XmlEditingScope class. |
|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
MemberwiseClone() | (Inherited from Object.) |
|
Revert() | Reverts all the changes made while this XmlEditingScope object was active and sets the parse tree back to the state it was in before this XmlEditingScope began. The XmlEditingScopeStatus is set to Reverted. If this XmlEditingScope is the top-most parent, an EditingScopeCompleted event will be raised on the associated XmlStore. You can tell whether the XmlEditingScope was reverted in your EditingScopeCompleted event handler by checking the XmlEditingScopeStatus. |
|
ToString() | (Inherited from Object.) |
Remarks
You can make any number of changes on any of the T:System.Xml.Linq.XNodes in the XmlModel objects returned from the XmlStore. All these changes will be pushed to the various XML editor buffers when you call M:Microsoft.VisualStudio.XmlEditor.Complete. Linked multi-buffer undo is supported.
Examples
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.
See Also
Microsoft.VisualStudio.XmlEditor Namespace
Return to top