Skip to content

Instantly share code, notes, and snippets.

🛠
Xamarin Forms 🥇

dylanberry dylanberry

🛠
Xamarin Forms 🥇
Block or report user

Report or block dylanberry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View MainPage.xaml.cs
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
View VersionCheckHandler.cs
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
View ClientVersionNotSupportedException.cs
using System;
using System.Runtime.Serialization;
namespace VersionCheck.Common
{
[Serializable]
public class ClientVersionNotSupportedException : Exception, ISerializable
{
public string MinimumSupportedClientVersionString { get; }
public string ApiVersionString { get; }
View MinimumClientVersionFilter.cs
using Microsoft.AspNetCore.Mvc.Filters;
namespace VersionCheck.API.VersionCheck
{
public class MinimumClientVersionFilter : IActionFilter
{
private readonly IVersionCheckService _versionCheckHelper;
public MinimumClientVersionFilter(IVersionCheckService versionCheckHelper)
{
View IVersionCheckService.cs
using Microsoft.AspNetCore.Http;
namespace VersionCheck.API.VersionCheck
{
public interface IVersionCheckService
{
void PerformVersionCheck(HttpRequest request);
string MinimumClientVersion { get; }
}
}
View VersionCheckHandler.Request.cs
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
View Linker.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Exclude EF.Core dependencies from Xamarin.iOS linking -->
<linker>
<assembly fullname="System">
<type fullname="System.ComponentModel.ReferenceConverter">
<method signature="System.Void .ctor(System.Type)" />
</type>
</assembly>
<assembly fullname="mscorlib">
<type fullname="System.String">
View Startup_HttpClient_DI.cs
using HttpTracer;
using System.Net.Http;
using Microsoft.AspNetCore.Components.Browser;
using Microsoft.AspNetCore.Components.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Components;
using System;
using Microsoft.AspNetCore.Blazor.Services;
using Microsoft.AspNetCore.Blazor.Http;
using System.Threading.Tasks;
View Startup.cs
using HttpTracer;
using System.Net.Http;
using Microsoft.AspNetCore.Components.Browser;
using Microsoft.AspNetCore.Components.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Components;
using System;
using Microsoft.AspNetCore.Blazor.Services;
using Microsoft.AspNetCore.Blazor.Http;
View CheckBox.cs
/// <summary>
/// The check box.
/// </summary>
public class CheckBox : View
{
/// <summary>
/// The checked state property.
/// </summary>
public static readonly BindableProperty CheckedProperty =
BindableProperty.Create(nameof(Checked), typeof (bool), typeof (CheckBox), false, BindingMode.TwoWay,
You can’t perform that action at this time.