C# Class ScrewTurn.Wiki.Snippets

Manages snippets.
显示文件 Open project: mono/ScrewTurnWiki

Public Properties

Property Type Description
ParametersRegex System.Text.RegularExpressions.Regex

Public Methods

Method Description
AddSnippet ( string name, string content, IPagesStorageProviderV30 provider ) : bool

Creates a new Snippet.

CountParameters ( System.Snippet snippet ) : int

Counts the parameters in a snippet.

ExtractParameterNames ( System.Snippet snippet ) : string[]

Finds the parameters in a snippet.

Find ( string name ) : System.Snippet

Finds a Snippet.

GetSnippets ( ) : List

Gets the complete list of the Snippets.

ModifySnippet ( System.Snippet snippet, string content ) : bool

Modifies the Content of a Snippet.

RemoveSnippet ( System.Snippet snippet ) : bool

Removes a Snippet.

Method Details

AddSnippet() public static method

Creates a new Snippet.
public static AddSnippet ( string name, string content, IPagesStorageProviderV30 provider ) : bool
name string The name of the Snippet.
content string The content of the Snippet.
provider IPagesStorageProviderV30 The Provider to use to store the Snippet (null for the default provider).
return bool

CountParameters() public static method

Counts the parameters in a snippet.
public static CountParameters ( System.Snippet snippet ) : int
snippet System.Snippet The snippet.
return int

ExtractParameterNames() public static method

Finds the parameters in a snippet.
public static ExtractParameterNames ( System.Snippet snippet ) : string[]
snippet System.Snippet The snippet.
return string[]

Find() public static method

Finds a Snippet.
public static Find ( string name ) : System.Snippet
name string The Name of the Snippet to find.
return System.Snippet

GetSnippets() public static method

Gets the complete list of the Snippets.
public static GetSnippets ( ) : List
return List

ModifySnippet() public static method

Modifies the Content of a Snippet.
public static ModifySnippet ( System.Snippet snippet, string content ) : bool
snippet System.Snippet The Snippet to update.
content string The new Content.
return bool

RemoveSnippet() public static method

Removes a Snippet.
public static RemoveSnippet ( System.Snippet snippet ) : bool
snippet System.Snippet The Snippet to remove.
return bool

Property Details

ParametersRegex public_oe static_oe property

The regular expression to use for extracting parameters.
public static Regex,System.Text.RegularExpressions ParametersRegex
return System.Text.RegularExpressions.Regex