-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve and add more value delegates functionality
- Loading branch information
1 parent
3bae914
commit 0043e9c
Showing
28 changed files
with
2,163 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,62 @@ | ||
namespace System.Delegates | ||
{ | ||
public interface IFunc<TResult> | ||
public interface IFunc<out TResult> | ||
{ | ||
TResult Invoke(); | ||
} | ||
|
||
public interface IFunc<TClosure, TResult> | ||
public interface IFunc<in TClosure, out TResult> | ||
{ | ||
TResult Invoke(TClosure closure); | ||
} | ||
|
||
public interface IFunc<TClosure, T, TResult> : IFunc<TClosure, TResult> | ||
public interface IFunc<in TClosure, in T, out TResult> : IFunc<TClosure, TResult> | ||
{ | ||
void SetArguments(T arg); | ||
} | ||
|
||
public interface IFunc<TClosure, T1, T2, TResult> : IFunc<TClosure, TResult> | ||
public interface IFunc<in TClosure, in T1, in T2, out TResult> : IFunc<TClosure, TResult> | ||
{ | ||
void SetArguments(T1 arg1, T2 arg2); | ||
} | ||
|
||
public interface IFunc<TClosure, T1, T2, T3, TResult> : IFunc<TClosure, TResult> | ||
public interface IFunc<in TClosure, in T1, in T2, in T3, out TResult> : IFunc<TClosure, TResult> | ||
{ | ||
void SetArguments(T1 arg1, T2 arg2, T3 arg3); | ||
} | ||
|
||
public interface IFunc<TClosure, T1, T2, T3, T4, TResult> : IFunc<TClosure, TResult> | ||
public interface IFunc<in TClosure, in T1, in T2, in T3, in T4, out TResult> : IFunc<TClosure, TResult> | ||
{ | ||
void SetArguments(T1 arg1, T2 arg2, T3 arg3, T4 arg4); | ||
} | ||
|
||
public interface IFunc<TClosure, T1, T2, T3, T4, T5, TResult> : IFunc<TClosure, TResult> | ||
public interface IFunc<in TClosure, in T1, in T2, in T3, in T4, in T5, out TResult> : IFunc<TClosure, TResult> | ||
{ | ||
void SetArguments(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); | ||
} | ||
|
||
public interface IFuncArgIn<in TClosure, T, out TResult> : IFunc<TClosure, TResult> | ||
{ | ||
void SetArguments(in T arg); | ||
} | ||
|
||
public interface IFuncArgIn<in TClosure, T1, T2, out TResult> : IFunc<TClosure, TResult> | ||
{ | ||
void SetArguments(in T1 arg1, in T2 arg2); | ||
} | ||
|
||
public interface IFuncArgIn<in TClosure, T1, T2, T3, out TResult> : IFunc<TClosure, TResult> | ||
{ | ||
void SetArguments(in T1 arg1, in T2 arg2, in T3 arg3); | ||
} | ||
|
||
public interface IFuncArgIn<in TClosure, T1, T2, T3, T4, out TResult> : IFunc<TClosure, TResult> | ||
{ | ||
void SetArguments(in T1 arg1, in T2 arg2, in T3 arg3, in T4 arg4); | ||
} | ||
|
||
public interface IFuncArgIn<in TClosure, T1, T2, T3, T4, T5, out TResult> : IFunc<TClosure, TResult> | ||
{ | ||
void SetArguments(in T1 arg1, in T2 arg2, in T3 arg3, in T4 arg4, in T5 arg5); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,57 @@ | ||
namespace System.Delegates | ||
{ | ||
public interface IFuncRef<TClosure, TResult> | ||
public interface IFuncRef<TClosure, out TResult> | ||
{ | ||
TResult Invoke(ref TClosure closure); | ||
} | ||
|
||
public interface IFuncRef<TClosure, T, TResult> : IFuncRef<TClosure, TResult> | ||
public interface IFuncRef<TClosure, in T, out TResult> : IFuncRef<TClosure, TResult> | ||
{ | ||
void SetArguments(T arg); | ||
} | ||
|
||
public interface IFuncRef<TClosure, T1, T2, TResult> : IFuncRef<TClosure, TResult> | ||
public interface IFuncRef<TClosure, in T1, in T2, out TResult> : IFuncRef<TClosure, TResult> | ||
{ | ||
void SetArguments(T1 arg1, T2 arg2); | ||
} | ||
|
||
public interface IFuncRef<TClosure, T1, T2, T3, TResult> : IFuncRef<TClosure, TResult> | ||
public interface IFuncRef<TClosure, in T1, in T2, in T3, out TResult> : IFuncRef<TClosure, TResult> | ||
{ | ||
void SetArguments(T1 arg1, T2 arg2, T3 arg3); | ||
} | ||
|
||
public interface IFuncRef<TClosure, T1, T2, T3, T4, TResult> : IFuncRef<TClosure, TResult> | ||
public interface IFuncRef<TClosure, in T1, in T2, in T3, in T4, out TResult> : IFuncRef<TClosure, TResult> | ||
{ | ||
void SetArguments(T1 arg1, T2 arg2, T3 arg3, T4 arg4); | ||
} | ||
|
||
public interface IFuncRef<TClosure, T1, T2, T3, T4, T5, TResult> : IFuncRef<TClosure, TResult> | ||
public interface IFuncRef<TClosure, in T1, in T2, in T3, in T4, in T5, out TResult> : IFuncRef<TClosure, TResult> | ||
{ | ||
void SetArguments(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); | ||
} | ||
|
||
public interface IFuncRefArgIn<TClosure, T, out TResult> : IFuncRef<TClosure, TResult> | ||
{ | ||
void SetArguments(in T arg); | ||
} | ||
|
||
public interface IFuncRefArgIn<TClosure, T1, T2, out TResult> : IFuncRef<TClosure, TResult> | ||
{ | ||
void SetArguments(in T1 arg1, in T2 arg2); | ||
} | ||
|
||
public interface IFuncRefArgIn<TClosure, T1, T2, T3, out TResult> : IFuncRef<TClosure, TResult> | ||
{ | ||
void SetArguments(in T1 arg1, in T2 arg2, in T3 arg3); | ||
} | ||
|
||
public interface IFuncRefArgIn<TClosure, T1, T2, T3, T4, out TResult> : IFuncRef<TClosure, TResult> | ||
{ | ||
void SetArguments(in T1 arg1, in T2 arg2, in T3 arg3, in T4 arg4); | ||
} | ||
|
||
public interface IFuncRefArgIn<TClosure, T1, T2, T3, T4, T5, out TResult> : IFuncRef<TClosure, TResult> | ||
{ | ||
void SetArguments(in T1 arg1, in T2 arg2, in T3 arg3, in T4 arg4, in T5 arg5); | ||
} | ||
} |
Oops, something went wrong.