C# Class SIL.FieldWorks.Common.Controls.ReplaceWithMethod

Implement FakeDoIt by replacing whatever matches the pattern with the result.
Inheritance: DoItMethod
Exibir arquivo Open project: sillsdev/FieldWorks

Public Methods

Method Description
Doit ( int hvo ) : void

This is very like the base Doit, but we can save a duplicate pattern search by calling the BASE version of OkToChange rather than our own version, which tests for at least one match. We DO need to call the base version, e.g., so we don't change wordforms which shouldn't change because they are in use.

ReplaceWithMethod ( SIL.FieldWorks.FDO.FdoCache cache, ISilDataAccessManaged sda, FieldReadWriter accessor, XmlNode spec, IVwPattern pattern, ITsString replacement ) : System

Protected Methods

Method Description
NewValue ( int hvo ) : ITsString

Actually produce the replacement string.

OkToChange ( int hvo ) : bool

We can do a replace if the pattern matches.

Method Details

Doit() public method

This is very like the base Doit, but we can save a duplicate pattern search by calling the BASE version of OkToChange rather than our own version, which tests for at least one match. We DO need to call the base version, e.g., so we don't change wordforms which shouldn't change because they are in use.
public Doit ( int hvo ) : void
hvo int
return void

NewValue() protected method

Actually produce the replacement string.
protected NewValue ( int hvo ) : ITsString
hvo int
return ITsString

OkToChange() protected method

We can do a replace if the pattern matches.
protected OkToChange ( int hvo ) : bool
hvo int
return bool

ReplaceWithMethod() public method

public ReplaceWithMethod ( SIL.FieldWorks.FDO.FdoCache cache, ISilDataAccessManaged sda, FieldReadWriter accessor, XmlNode spec, IVwPattern pattern, ITsString replacement ) : System
cache SIL.FieldWorks.FDO.FdoCache
sda ISilDataAccessManaged
accessor FieldReadWriter
spec System.Xml.XmlNode
pattern IVwPattern
replacement ITsString
return System