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
System_CAPS_protmethod XmlEditingScope()

Initializes a new instance of the XmlEditingScope class.

Properties

Name Description
System_CAPS_pubproperty IsUndo

Returns a boolean value indicating whether this XmlEditingScope is the result of an Undo or Redo operation.

System_CAPS_pubproperty Name

Gets the name provided in XmlEditingScope.

System_CAPS_pubproperty Parent

Returns the parent object if this XmlEditingScope has a parent.

System_CAPS_pubproperty Status

Returns the status of this XmlEditingScope.

System_CAPS_pubproperty Store

Gets the XmlStore instance that created this XmlEditingScope.

System_CAPS_pubproperty UndoScope

Returns the original XmlEditingScope that created the undo unit if this XmlEditingScope comes from the UndoRedoCompleted event. Returns null in other cases.

System_CAPS_pubproperty UserState

Gets the state object that was provided to the M:Microsoft.VisualStudio.XmlEditor.XmlStore.BeginEditingScope method.

Methods

Name Description
System_CAPS_pubmethod Changes(XmlModel)

Returns a list of all pending XmlModelChange objects for the specified model.

System_CAPS_pubmethod Changes(XmlStore)

Returns a list of all pending XmlModelChange objects for the spcified XmlStore.

System_CAPS_pubmethod 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.

System_CAPS_pubmethod Dispose()

Releases all resources used by the current instance of the XmlEditingScope class.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod 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.

System_CAPS_pubmethod 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