SourceModifier Class
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Used to modify the contents of a source document.
Namespace: Microsoft.Windows.Design.SourceUpdate
Assembly: Microsoft.Windows.Design.Markup (in Microsoft.Windows.Design.Markup.dll)
Syntax
'Declaration
Public Class SourceModifier
'Usage
Dim instance As SourceModifier
public class SourceModifier
public ref class SourceModifier
public class SourceModifier
Remarks
The SourceModifier class supports addition, deletion, replace/update (a delete followed by an add operation), and move (a delete followed by an add of the deleted text). Operations can be made in any order and are applied in a logical and consistent manner. When you use SourceModifier, you are not forced to manage the order of additions, deletions and updates.
When you use SourceModifier, you must pass in an implementation of ISourceChanger. This ISourceChanger is used to perform update operations on the underlying source document (You can optionally pass in an ISourceReader and an IComparer).
No changes are made to the source until the Commit method is called. Once Commit is called all subsequent calls to the SourceModifier are invalid.
All offsets (locations) are in character offsets from the beginning of the source as read from an ISourceReader and are relative to the unmodified version of the source.
All offsets in the collection of SourceFragment objects returned by Commit are relative to the modified version of the source.
Inheritance Hierarchy
System.Object
Microsoft.Windows.Design.SourceUpdate.SourceModifier
Microsoft.Windows.Design.SourceUpdate.StringSourceModifier
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
Reference
Microsoft.Windows.Design.SourceUpdate Namespace