Add XMLDoc documentation to functions
This commit is contained in:
parent
7864da2701
commit
a936188e46
10 changed files with 316 additions and 1 deletions
|
|
@ -4,8 +4,18 @@ using System.Text;
|
|||
|
||||
namespace CSMic.StandardLibrary.Functions
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the standard-library <c>sqrt</c> function.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The <c>sqrt</c> function evaluates a numeric expression and returns its square root.
|
||||
/// </remarks>
|
||||
public class SquareRoot: FunctionBase, ICodedFunction
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the expression-language name used to invoke this function.
|
||||
/// </summary>
|
||||
/// <value><c>sqrt</c>.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
|
|
@ -14,6 +24,10 @@ namespace CSMic.StandardLibrary.Functions
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the argument signature expected by the <c>sqrt</c> function.
|
||||
/// </summary>
|
||||
/// <value>A single numeric argument named <c>value</c>.</value>
|
||||
public override IEnumerable<FunctionArgument> ExpectedArguments
|
||||
{
|
||||
get
|
||||
|
|
@ -22,6 +36,15 @@ namespace CSMic.StandardLibrary.Functions
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes the <c>sqrt</c> function.
|
||||
/// </summary>
|
||||
/// <param name="args">
|
||||
/// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A numeric <see cref="FunctionValue"/> containing the square root of the input.
|
||||
/// </returns>
|
||||
public FunctionValue Execute(params FunctionArgument[] args)
|
||||
{
|
||||
return base.Execute(args, (_args) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue