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 Android.Views; | |
... | |
public class CustomInsertionActionModeCallback : Java.Lang.Object, ActionMode.ICallback | |
{ | |
public bool OnCreateActionMode(ActionMode mode, IMenu menu) => false; | |
public bool OnActionItemClicked(ActionMode m, IMenuItem i) => false; | |
public bool OnPrepareActionMode(ActionMode mode, IMenu menu) => true; |
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
// iOS implementation | |
using System.Net; | |
using CoreFoundation; | |
... | |
public class ProxyInfoProvider : IProxyInfoProvider | |
{ | |
public WebProxy GetProxySettings() | |
{ | |
var systemProxySettings = CFNetwork.GetSystemProxySettings(); |
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
// Android implementation | |
using System.Net; | |
using Java.Lang; | |
... | |
public class ProxyInfoProvider : IProxyInfoProvider | |
{ | |
public WebProxy GetProxySettings() | |
{ | |
var proxyHost = JavaSystem.GetProperty("http.proxyHost"); |
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.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
... | |
public class HttpService | |
{ | |
private readonly HttpClient _httpClient; |
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.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
... | |
public class HttpService | |
{ | |
private readonly IProxyInfoProvider _proxyInfoProvider; |
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; | |
... | |
public interface IProxyInfoProvider | |
{ | |
WebProxy GetProxySettings(); | |
} |
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.Diagnostics; | |
using CoreAnimation; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.iOS; | |
using <project>.Effects; | |
using <project>.iOS.Effects; | |
[assembly: ResolutionGroupName("<project>")] |
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.Diagnostics; | |
using Android.Graphics; | |
using Android.Views; | |
using Xamarin.Essentials; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.Android; | |
using <project>.Effects; | |
using <project>.Droid.Effects; |
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.Linq; | |
using Xamarin.Forms; | |
namespace <project>.Effects | |
{ | |
public class RoundCornersEffect : RoutingEffect | |
{ | |
public RoundCornersEffect() : base($"<project>.{nameof(RoundCornersEffect)}") | |
{ | |
} |
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
greetings: Hello, world! |