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 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 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 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 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 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 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 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 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 | |
{ |
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
namespace UIKit | |
{ | |
/// <summary> | |
/// Xamarin.IOS extension that gets the parent <see cref="UITableView"/> from the <see cref="UITableViewCell"/> | |
/// </summary> | |
/// <seealso cref="https://stackoverflow.com/questions/15711645/how-to-get-uitableview-from-uitableviewcell"/> | |
public static class UITableViewCell_GetTableView | |
{ | |
/// <summary> | |
/// Gets the parent <see cref="UITableView"/> |
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
namespace UIKit | |
{ | |
public static class UITableView_SelectCell | |
{ | |
public static void SelectCell(this UITableView @this, UITableViewCell cell) | |
{ | |
var index = @this.IndexPathForCell(cell); | |
@this.SelectRow(index, true, UITableViewScrollPosition.None); | |
@this.Delegate.RowSelected(@this, index); | |
} |