|  | 
|  | 1 | +// | 
|  | 2 | +// Copyright (c) .NET Foundation and Contributors | 
|  | 3 | +// Portions Copyright (c) Microsoft Corporation.  All rights reserved. | 
|  | 4 | +// See LICENSE file in the project root for full license information. | 
|  | 5 | +// | 
|  | 6 | + | 
|  | 7 | +namespace System | 
|  | 8 | +{ | 
|  | 9 | +    using System.Runtime.CompilerServices; | 
|  | 10 | + | 
|  | 11 | +    /// <summary> | 
|  | 12 | +    /// Encapsulates a method that has no parameters and does not return a value. | 
|  | 13 | +    /// </summary> | 
|  | 14 | +    public delegate void Action(); | 
|  | 15 | + | 
|  | 16 | +    /// <summary> | 
|  | 17 | +    /// Encapsulates a method that has a single parameter and does not return a value. | 
|  | 18 | +    /// </summary> | 
|  | 19 | +    /// <typeparam name="T">The type of the parameter of the method that this delegate encapsulates. | 
|  | 20 | +    /// This type parameter is covariant.That is, you can use either the type you specified or any type that is more derived.For more information about covariance and contravariance, see <see href="https://docs.microsoft.com/en-us/dotnet/standard/generics/covariance-and-contravariance">Covariance and Contravariance in Generics</see>.</typeparam> | 
|  | 21 | +    /// <param name="obj">The parameter of the method that this delegate encapsulates.</param> | 
|  | 22 | +    public delegate void Action<in T>(T obj); | 
|  | 23 | + | 
|  | 24 | +    /// <summary> | 
|  | 25 | +    /// Encapsulates a method that has a single parameter and does not return a value. | 
|  | 26 | +    /// </summary> | 
|  | 27 | +    /// <typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates. | 
|  | 28 | +    /// This type parameter is covariant.That is, you can use either the type you specified or any type that is more derived.For more information about covariance and contravariance, see <see href="https://docs.microsoft.com/en-us/dotnet/standard/generics/covariance-and-contravariance">Covariance and Contravariance in Generics</see>.</typeparam> | 
|  | 29 | +    /// <typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates. | 
|  | 30 | +    /// This type parameter is covariant.That is, you can use either the type you specified or any type that is more derived.For more information about covariance and contravariance, see <see href="https://docs.microsoft.com/en-us/dotnet/standard/generics/covariance-and-contravariance">Covariance and Contravariance in Generics</see>.</typeparam> | 
|  | 31 | +    /// <param name="arg1">The first parameter of the method that this delegate encapsulates.</param> | 
|  | 32 | +    /// <param name="arg2">The second parameter of the method that this delegate encapsulates.</param> | 
|  | 33 | +    public delegate void Action<in T1, in T2>(T1 arg1, T2 arg2); | 
|  | 34 | + | 
|  | 35 | +    /// <summary> | 
|  | 36 | +    /// Encapsulates a method that has no parameters and returns a value of the type specified by the <typeparamref name="TResult"/> parameter. | 
|  | 37 | +    /// </summary> | 
|  | 38 | +    /// <typeparam name="TResult">The type of the return value of the method that this delegate encapsulates. | 
|  | 39 | +    /// This type parameter is covariant.That is, you can use either the type you specified or any type that is more derived.For more information about covariance and contravariance, see <see href="https://docs.microsoft.com/en-us/dotnet/standard/generics/covariance-and-contravariance">Covariance and Contravariance in Generics</see>.</typeparam> | 
|  | 40 | +    /// <returns>The return value of the method that this delegate encapsulates.</returns> | 
|  | 41 | +    public delegate TResult Func<out TResult>(); | 
|  | 42 | + | 
|  | 43 | +    /// <summary> | 
|  | 44 | +    /// Encapsulates a method that has one parameter and returns a value of the type specified by the <typeparamref name="TResult"/> parameter. | 
|  | 45 | +    /// </summary> | 
|  | 46 | +    /// <typeparam name="T">The type of the parameter of the method that this delegate encapsulates. | 
|  | 47 | +    /// This type parameter is covariant.That is, you can use either the type you specified or any type that is more derived.For more information about covariance and contravariance, see <see href="https://docs.microsoft.com/en-us/dotnet/standard/generics/covariance-and-contravariance">Covariance and Contravariance in Generics</see>.</typeparam> | 
|  | 48 | +    /// <typeparam name="TResult">The type of the return value of the method that this delegate encapsulates. | 
|  | 49 | +    /// This type parameter is covariant.That is, you can use either the type you specified or any type that is more derived.For more information about covariance and contravariance, see <see href="https://docs.microsoft.com/en-us/dotnet/standard/generics/covariance-and-contravariance">Covariance and Contravariance in Generics</see>.</typeparam> | 
|  | 50 | +    /// <param name="arg">The parameter of the method that this delegate encapsulates.</param> | 
|  | 51 | +    /// <returns>The return value of the method that this delegate encapsulates.</returns> | 
|  | 52 | +    public delegate TResult Func<in T, out TResult>(T arg); | 
|  | 53 | + | 
|  | 54 | +    /// <summary> | 
|  | 55 | +    /// Encapsulates a method that has one parameter and returns a value of the type specified by the <typeparamref name="TResult"/> parameter. | 
|  | 56 | +    /// </summary> | 
|  | 57 | +    /// <typeparam name="T1">The type of the parameter of the method that this delegate encapsulates.</typeparam> | 
|  | 58 | +    /// <typeparam name="T2">The type of the parameter of the method that this delegate encapsulates.</typeparam> | 
|  | 59 | +    /// <typeparam name="TResult">The type of the return value of the method that this delegate encapsulates. | 
|  | 60 | +    /// This type parameter is covariant.That is, you can use either the type you specified or any type that is more derived.For more information about covariance and contravariance, see <see href="https://docs.microsoft.com/en-us/dotnet/standard/generics/covariance-and-contravariance">Covariance and Contravariance in Generics</see>.</typeparam> | 
|  | 61 | +    /// <param name="arg1">The first parameter of the method that this delegate encapsulates.</param> | 
|  | 62 | +    /// <param name="arg2">The second parameter of the method that this delegate encapsulates.</param> | 
|  | 63 | +    /// <returns>The return value of the method that this delegate encapsulates.</returns> | 
|  | 64 | +    public delegate TResult Func<in T1, in T2, out TResult>(T1 arg1, T2 arg2); | 
|  | 65 | +} | 
0 commit comments