This repository was archived by the owner on Mar 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathStringFunction.cs
More file actions
41 lines (35 loc) · 1.72 KB
/
StringFunction.cs
File metadata and controls
41 lines (35 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// StringFunction.cs
// Script#/Libraries/jQuery/Core
// This source code is subject to terms and conditions of the Apache License, Version 2.0.
//
using System;
using System.Html;
using System.Runtime.CompilerServices;
namespace jQueryApi {
/// <summary>
/// A callback that returns a value for the element at the specified index.
/// </summary>
/// <param name="index">The index of the element in the set.</param>
public delegate string StringFunction(int index);
/// <summary>
/// A callback that returns a value for the element at the specified index.
/// </summary>
/// <param name="element">Element for which the function is being invoked, in script represented as 'this'.</param>
/// <param name="index">The index of the element in the set.</param>
[BindThisToFirstParameter]
public delegate string StringFunctionWithContext(Element element, int index);
/// <summary>
/// A callback that returns a value for the element at the specified index.
/// </summary>
/// <param name="index">The index of the element in the set.</param>
/// <param name="currentValue">The current value.</param>
public delegate string StringReplaceFunction(int index, string currentValue);
/// <summary>
/// A callback that returns a value for the element at the specified index.
/// </summary>
/// <param name="element">Element for which the function is being invoked, in script represented as 'this'.</param>
/// <param name="index">The index of the element in the set.</param>
/// <param name="currentValue">The current value.</param>
[BindThisToFirstParameter]
public delegate string StringReplaceFunctionWithContext(Element element, int index, string currentValue);
}