This file contains hidden or 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 UIKit; | |
namespace App.iOS.Extensions | |
{ | |
public static class UIViewController_AddSearchController | |
{ | |
public static UISearchController AddSearchController(this UIViewController @this) | |
{ | |
var searchController = new UISearchController(null as UIViewController); |
This file contains hidden or 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.Threading; | |
namespace Core.Extensions | |
{ | |
public static class CancellationTokenSourceRenew | |
{ | |
public static CancellationTokenSource Renew(this CancellationTokenSource @this) | |
{ | |
Cancel(@this); | |
return new CancellationTokenSource(); |
This file contains hidden or 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 Core.Extensions; | |
namespace Core.ValueTypes | |
{ | |
public class StringCaseInsensitiveUnaccented | |
{ | |
public static bool Compare(string a, string b) | |
=> a.RemoveDiacritics().ToUpper().Equals(b.RemoveDiacritics().ToUpper()); | |
} | |
} |
This file contains hidden or 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.Globalization; | |
using System.Linq; | |
using System.Text; | |
namespace Core.Extensions | |
{ | |
public static class String_RemoveDiacritics | |
{ | |
public static string RemoveDiacritics(this string @this) | |
=> string.Concat( |
This file contains hidden or 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.Widget; | |
using Java.Lang; | |
namespace App.Droid.Extensions | |
{ | |
/// <summary> | |
/// Extension method GetItem for <see cref="AdapterView.ItemClickEventArgs"/> | |
/// </summary> | |
/// <seealso cref="https://stackoverflow.com/questions/4819813/how-to-get-text-from-autocomplete-textview-android"/> | |
public static class AdapterView_ItemClickEventArgs_GetItem |
This file contains hidden or 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 Java.Lang; | |
namespace App.Droid.Extensions | |
{ | |
/// <summary> | |
/// Extension method Cast for <see cref="Java.Lang.Object"/>. | |
/// </summary> | |
/// <seealso cref="https://stackoverflow.com/questions/6594250/type-cast-from-java-lang-object-to-native-clr-type-in-monodroid"/> | |
public static class JavaLangObject_Cast | |
{ |
This file contains hidden or 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.Widget; | |
namespace App.Droid.Extensions | |
{ | |
/// <summary> | |
/// Extension method ShowSuggestions to AutoCompleteTextView | |
/// </summary> | |
/// <seealso cref="https://stackoverflow.com/questions/2126717/android-autocompletetextview-show-suggestions-when-no-text-entered"/> | |
public static class AutoCompleteTextView_ShowSuggestions | |
{ |
This file contains hidden or 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 UIKit; | |
namespace UIKit | |
{ | |
public static class UITableViewCell_GetUITableView | |
{ | |
/// <summary> | |
/// Get the <see cref="UITableView"/> associated with this cell. | |
/// </summary> | |
/// <param name="this"></param> |
This file contains hidden or 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.IO; | |
using System.Reflection; | |
namespace Core.Utils | |
{ | |
public static class EmbeddedResource | |
{ | |
public static string ReadString(Assembly assembly, string @namespace ,string filename) | |
{ | |
var stream = assembly.GetManifestResourceStream($"{@namespace}.{filename}"); |
This file contains hidden or 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.Collections.Generic; | |
namespace System.Linq | |
{ | |
/// <summary> | |
/// Filtering out values from a C# Generic Dictionary | |
/// </summary> | |
/// <seealso cref="https://stackoverflow.com/questions/2131648/filtering-out-values-from-a-c-sharp-generic-dictionary"/> | |
public static class IDictionary_WhereToDictionary | |
{ |