Merge pull request #3174 from aspnet/release/2.2

Merge release/2.2 Remove functional interfaces (#3165)
This commit is contained in:
Mikael Mengistu 2018-10-22 15:03:04 -07:00 committed by GitHub
commit bd60f71cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 20 additions and 10 deletions

View File

@ -6,7 +6,8 @@ package com.microsoft.signalr;
/**
* A callback that takes no parameters.
*/
@FunctionalInterface
public interface Action {
// We can't use the @FunctionalInterface annotation because it's only
// available on Android API Level 24 and above.
void invoke();
}

View File

@ -8,7 +8,8 @@ package com.microsoft.signalr;
*
* @param <T1> The type of the first parameter to the callback.
*/
@FunctionalInterface
public interface Action1<T1> {
// We can't use the @FunctionalInterface annotation because it's only
// available on Android API Level 24 and above.
void invoke(T1 param1);
}

View File

@ -9,7 +9,8 @@ package com.microsoft.signalr;
* @param <T1> The type of the first parameter to the callback.
* @param <T2> The type of the second parameter to the callback.
*/
@FunctionalInterface
public interface Action2<T1, T2> {
// We can't use the @FunctionalInterface annotation because it's only
// available on Android API Level 24 and above.
void invoke(T1 param1, T2 param2);
}

View File

@ -10,7 +10,8 @@ package com.microsoft.signalr;
* @param <T2> The type of the second parameter to the callback.
* @param <T3> The type of the third parameter to the callback.
*/
@FunctionalInterface
public interface Action3<T1, T2, T3> {
// We can't use the @FunctionalInterface annotation because it's only
// available on Android API Level 24 and above.
void invoke(T1 param1, T2 param2, T3 param3);
}

View File

@ -11,7 +11,8 @@ package com.microsoft.signalr;
* @param <T3> The type of the third parameter to the callback.
* @param <T4> The type of the fourth parameter to the callback.
*/
@FunctionalInterface
public interface Action4<T1, T2, T3, T4> {
// We can't use the @FunctionalInterface annotation because it's only
// available on Android API Level 24 and above.
void invoke(T1 param1, T2 param2, T3 param3, T4 param4);
}

View File

@ -12,7 +12,8 @@ package com.microsoft.signalr;
* @param <T4> The type of the fourth parameter to the callback.
* @param <T5> The type of the fifth parameter to the callback.
*/
@FunctionalInterface
public interface Action5<T1, T2, T3, T4, T5> {
// We can't use the @FunctionalInterface annotation because it's only
// available on Android API Level 24 and above.
void invoke(T1 param1, T2 param2, T3 param3, T4 param4, T5 param5);
}

View File

@ -13,7 +13,8 @@ package com.microsoft.signalr;
* @param <T5> The type of the fifth parameter to the callback.
* @param <T6> The type of the sixth parameter to the callback.
*/
@FunctionalInterface
public interface Action6<T1, T2, T3, T4, T5, T6> {
// We can't use the @FunctionalInterface annotation because it's only
// available on Android API Level 24 and above.
void invoke(T1 param1, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6);
}

View File

@ -14,7 +14,8 @@ package com.microsoft.signalr;
* @param <T6> The type of the sixth parameter to the callback.
* @param <T7> The type of the seventh parameter to the callback.
*/
@FunctionalInterface
public interface Action7<T1, T2, T3, T4, T5, T6, T7> {
// We can't use the @FunctionalInterface annotation because it's only
// available on Android API Level 24 and above.
void invoke(T1 param1, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6, T7 param7);
}

View File

@ -15,7 +15,8 @@ package com.microsoft.signalr;
* @param <T7> The type of the seventh parameter to the callback.
* @param <T8> The type of the eighth parameter to the callback.
*/
@FunctionalInterface
public interface Action8<T1, T2, T3, T4, T5, T6, T7, T8> {
// We can't use the @FunctionalInterface annotation because it's only
// available on Android API Level 24 and above.
void invoke(T1 param1, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6, T7 param7, T8 param8);
}

View File

@ -3,7 +3,8 @@
package com.microsoft.signalr;
@FunctionalInterface
interface ActionBase {
// We can't use the @FunctionalInterface annotation because it's only
// available on Android API Level 24 and above.
void invoke(Object ... params);
}