-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIBackButtonHandler.cs
More file actions
26 lines (24 loc) · 1.03 KB
/
IBackButtonHandler.cs
File metadata and controls
26 lines (24 loc) · 1.03 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
namespace Gilzoide.BackButtonStack
{
/// <summary>Interface implemented by objects that handle the ESC/Back button.</summary>
/// <seealso cref="BackButtonStack"/>
public interface IBackButtonHandler
{
void HandleBackButton();
}
public static class IBackButtonHandlerExtensions
{
/// <summary>Alias for <c>BackButtonStack.Instance.AddButtonHandler(backButtonHandler)</c></summary>
/// <seealso cref="BackButtonStack.AddButtonHandler"/>
public static void AddToBackButtonStack(this IBackButtonHandler backButtonHandler)
{
BackButtonStack.Instance.AddButtonHandler(backButtonHandler);
}
/// <summary>Alias for <c>BackButtonStack.Instance.RemoveButtonHandler(backButtonHandler)</c></summary>
/// <seealso cref="BackButtonStack.RemoveButtonHandler"/>
public static void RemoveFromBackButtonStack(this IBackButtonHandler backButtonHandler)
{
BackButtonStack.Instance.RemoveButtonHandler(backButtonHandler);
}
}
}