1
|
/*
|
2
|
Copyright (c) 2003-2006 Niels Kokholm and Peter Sestoft
|
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
of this software and associated documentation files (the "Software"), to deal
|
5
|
in the Software without restriction, including without limitation the rights
|
6
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
copies of the Software, and to permit persons to whom the Software is
|
8
|
furnished to do so, subject to the following conditions:
|
9
|
|
10
|
The above copyright notice and this permission notice shall be included in
|
11
|
all copies or substantial portions of the Software.
|
12
|
|
13
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
SOFTWARE.
|
20
|
*/
|
21
|
|
22
|
using C5;
|
23
|
using System;
|
24
|
using System.Reflection;
|
25
|
using System.Reflection.Emit;
|
26
|
using System.Diagnostics;
|
27
|
|
28
|
#pragma warning disable 1711
|
29
|
namespace C5
|
30
|
{
|
31
|
/// <summary>
|
32
|
///
|
33
|
/// </summary>
|
34
|
public delegate void Act();
|
35
|
/// <summary>
|
36
|
/// <para>
|
37
|
/// The type Act[T] corresponds to System.Action[T] in the .Net
|
38
|
/// Framework class library.
|
39
|
///</para>
|
40
|
/// </summary>
|
41
|
/// <typeparam name="A1"></typeparam>
|
42
|
/// <param name="x1"></param>
|
43
|
public delegate void Act<A1>(A1 x1);
|
44
|
/// <summary>
|
45
|
///
|
46
|
/// </summary>
|
47
|
/// <typeparam name="A1"></typeparam>
|
48
|
/// <typeparam name="A2"></typeparam>
|
49
|
/// <param name="x1"></param>
|
50
|
/// <param name="x2"></param>
|
51
|
public delegate void Act<A1, A2>(A1 x1, A2 x2);
|
52
|
/// <summary>
|
53
|
///
|
54
|
/// </summary>
|
55
|
/// <typeparam name="A1"></typeparam>
|
56
|
/// <typeparam name="A2"></typeparam>
|
57
|
/// <typeparam name="A3"></typeparam>
|
58
|
/// <param name="x1"></param>
|
59
|
/// <param name="x2"></param>
|
60
|
/// <param name="x3"></param>
|
61
|
public delegate void Act<A1, A2, A3>(A1 x1, A2 x2, A3 x3);
|
62
|
/// <summary>
|
63
|
///
|
64
|
/// </summary>
|
65
|
/// <typeparam name="A1"></typeparam>
|
66
|
/// <typeparam name="A2"></typeparam>
|
67
|
/// <typeparam name="A3"></typeparam>
|
68
|
/// <typeparam name="A4"></typeparam>
|
69
|
/// <param name="x1"></param>
|
70
|
/// <param name="x2"></param>
|
71
|
/// <param name="x3"></param>
|
72
|
/// <param name="x4"></param>
|
73
|
public delegate void Act<A1, A2, A3, A4>(A1 x1, A2 x2, A3 x3, A4 x4);
|
74
|
|
75
|
/// <summary>
|
76
|
///
|
77
|
/// </summary>
|
78
|
/// <typeparam name="R"></typeparam>
|
79
|
/// <returns></returns>
|
80
|
public delegate R Fun<R>();
|
81
|
/// <summary>
|
82
|
/// Delegate type Fun[A1,R] is the type of functions (methods) from A1
|
83
|
/// to R, used to compute some transformation for a given collection
|
84
|
/// item.
|
85
|
/// <para>
|
86
|
/// The type Fun[T,U] corresponds to System.Converter[T,U] in the .Net
|
87
|
/// Framework class library, and the type Fun[T,bool] corresponds
|
88
|
/// System.Predicate[T] in the .Net Framework class library.</para>
|
89
|
/// </summary>
|
90
|
/// <typeparam name="A1"></typeparam>
|
91
|
/// <typeparam name="R"></typeparam>
|
92
|
/// <param name="x1"></param>
|
93
|
/// <returns></returns>
|
94
|
public delegate R Fun<A1, R>(A1 x1);
|
95
|
/// <summary>
|
96
|
///
|
97
|
/// </summary>
|
98
|
/// <typeparam name="A1"></typeparam>
|
99
|
/// <typeparam name="A2"></typeparam>
|
100
|
/// <typeparam name="R"></typeparam>
|
101
|
/// <param name="x1"></param>
|
102
|
/// <param name="x2"></param>
|
103
|
/// <returns></returns>
|
104
|
public delegate R Fun<A1, A2, R>(A1 x1, A2 x2);
|
105
|
/// <summary>
|
106
|
///
|
107
|
/// </summary>
|
108
|
/// <typeparam name="A1"></typeparam>
|
109
|
/// <typeparam name="A2"></typeparam>
|
110
|
/// <typeparam name="A3"></typeparam>
|
111
|
/// <typeparam name="R"></typeparam>
|
112
|
/// <param name="x1"></param>
|
113
|
/// <param name="x2"></param>
|
114
|
/// <param name="x3"></param>
|
115
|
/// <returns></returns>
|
116
|
public delegate R Fun<A1, A2, A3, R>(A1 x1, A2 x2, A3 x3);
|
117
|
/// <summary>
|
118
|
///
|
119
|
/// </summary>
|
120
|
/// <typeparam name="A1"></typeparam>
|
121
|
/// <typeparam name="A2"></typeparam>
|
122
|
/// <typeparam name="A3"></typeparam>
|
123
|
/// <typeparam name="A4"></typeparam>
|
124
|
/// <typeparam name="R"></typeparam>
|
125
|
/// <param name="x1"></param>
|
126
|
/// <param name="x2"></param>
|
127
|
/// <param name="x3"></param>
|
128
|
/// <param name="x4"></param>
|
129
|
/// <returns></returns>
|
130
|
public delegate R Fun<A1, A2, A3, A4, R>(A1 x1, A2 x2, A3 x3, A4 x4);
|
131
|
}
|