C# Class Subtext.Framework.Util.KeyWords

Show file Open project: ayende/Subtext

Public Methods

Method Description
CreateKeyWord ( KeyWord kw ) : int
DeleteKeyWord ( int KeyWordID ) : bool
Format ( Entry entry ) : void
GetKeyWord ( int KeyWordID ) : KeyWord
GetKeyWords ( ) : IList
GetPagedKeyWords ( int pageIndex, int pageSize ) : IPagedCollection
Replace ( string source, string oldValue, string newValue ) : string
Replace ( string source, string oldValue, string newValue, bool onlyFirstMatch ) : string
ReplaceFormat ( string source, string oldValue, string formatString ) : string

Preforms a forward scan and replace for a given pattern. Replaces all finds and preforms a case sensitive search

ReplaceFormat ( string source, string oldValue, string formatString, bool onlyFirstMatch ) : string

Preforms a forward scan and replace for a given pattern. Can specify only to match first fine and if the pattern is CaseSensitive

UpdateKeyWord ( KeyWord kw ) : void

Private Methods

Method Description
CharIsWordBoundary ( char value ) : bool
Scan ( string source, string oldValue, string newValue, bool isFormat, bool onlyFirstMatch ) : string

Method Details

CreateKeyWord() public static method

public static CreateKeyWord ( KeyWord kw ) : int
kw Subtext.Framework.Components.KeyWord
return int

DeleteKeyWord() public static method

public static DeleteKeyWord ( int KeyWordID ) : bool
KeyWordID int
return bool

Format() public static method

public static Format ( Entry entry ) : void
entry Subtext.Framework.Components.Entry
return void

GetKeyWord() public static method

public static GetKeyWord ( int KeyWordID ) : KeyWord
KeyWordID int
return Subtext.Framework.Components.KeyWord

GetKeyWords() public static method

public static GetKeyWords ( ) : IList
return IList

GetPagedKeyWords() public static method

public static GetPagedKeyWords ( int pageIndex, int pageSize ) : IPagedCollection
pageIndex int
pageSize int
return IPagedCollection

Replace() public static method

public static Replace ( string source, string oldValue, string newValue ) : string
source string
oldValue string
newValue string
return string

Replace() public static method

public static Replace ( string source, string oldValue, string newValue, bool onlyFirstMatch ) : string
source string
oldValue string
newValue string
onlyFirstMatch bool
return string

ReplaceFormat() public static method

Preforms a forward scan and replace for a given pattern. Replaces all finds and preforms a case sensitive search
public static ReplaceFormat ( string source, string oldValue, string formatString ) : string
source string Text to search
oldValue string Pattern to search for
formatString string Replaced Pattern
return string

ReplaceFormat() public static method

Preforms a forward scan and replace for a given pattern. Can specify only to match first fine and if the pattern is CaseSensitive
public static ReplaceFormat ( string source, string oldValue, string formatString, bool onlyFirstMatch ) : string
source string Text to search
oldValue string Pattern to search for
formatString string Replaced Pattern
onlyFirstMatch bool Match First Only
return string

UpdateKeyWord() public static method

public static UpdateKeyWord ( KeyWord kw ) : void
kw Subtext.Framework.Components.KeyWord
return void