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
public class AuthenticationService | |
{ | |
public bool IsUserAuthenticated => !string.IsNullOrWhiteSpace(AccessToken); | |
public string AccessToken { get; private set; } | |
private readonly IPublicClientApplication _publicClientApplication; | |
private readonly string[] _scopes; | |
private readonly JwtSecurityTokenHandler _jwtSecurityTokenHandler = new JwtSecurityTokenHandler(); | |
public AuthenticationService() |
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
<ContentPage> | |
<StackLayout> | |
@foreach (var option in Options) | |
{ | |
<Frame CornerRadius="4" Padding="0"> | |
<StackLayout Orientation="StackOrientation.Horizontal" Padding="5" | |
BackgroundColor="(option.IsEnabled ? (option.IsSelected ? Color.DarkBlue : Color.White) : Color.DarkGray)" | |
IsEnabled="option.IsEnabled"> | |
<Button Text="Select" OnClick="(() => OnSelectType(option))" /> | |
<Label Text="✓" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:local="clr-namespace:XamlFlags" | |
x:Class="XamlFlags.MainPage" | |
x:Name="Page"> | |
<ContentPage.BindingContext> | |
<local:MainPageViewModel /> | |
</ContentPage.BindingContext> | |
<StackLayout BindableLayout.ItemsSource="{Binding Options}"> |
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
protected override async void OnInitialized() | |
{ | |
try | |
{ | |
InitializeComponent(); | |
OneSignal.Current | |
.StartInit(Secrets.OneSignal) | |
.HandleNotificationOpened(OnNotificationOpened) | |
.EndInit(); |
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
using System; | |
using System.Threading.Tasks; | |
using System.Windows.Input; | |
using Xamarin.Essentials; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Xaml; | |
namespace XamlOpenUrl.Extensions | |
{ | |
[ContentProperty(nameof(Url))] |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
namespace BSILabs.Controls | |
{ | |
public class NullableDatePicker : DatePicker |
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
using Microsoft.AspNetCore.Mvc.Filters; | |
namespace VersionCheck.API.VersionCheck | |
{ | |
public class MinimumClientVersionFilter : IActionFilter | |
{ | |
private readonly IVersionCheckService _versionCheckHelper; | |
public MinimumClientVersionFilter(IVersionCheckService versionCheckHelper) | |
{ |
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
using System; | |
using System.Runtime.Serialization; | |
namespace VersionCheck.Common | |
{ | |
[Serializable] | |
public class ClientVersionNotSupportedException : Exception, ISerializable | |
{ | |
public string MinimumSupportedClientVersionString { get; } | |
public string ApiVersionString { get; } |
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
using System; | |
using System.ComponentModel; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using VersionCheck.Common; | |
using Xamarin.Forms; | |
namespace VersionCheck | |
{ | |
// Learn more about making custom code visible in the Xamarin.Forms previewer |
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
using System.Net; | |
using System.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
using VersionCheck.Common; | |
namespace VersionCheck | |
{ | |
public class VersionCheckHandler : DelegatingHandler |