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
git for-each-ref --format '%(refname:short)' refs/heads/ | grep -v master | xargs git branch -d |
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
/// <summary> | |
/// Things <see cref="DbModelBuilder"/> is missing or could be more succinct. | |
/// </summary> | |
public static class DbModelBuilderExtensions { | |
/// <summary> | |
/// Configures the primary key property for this entity type. | |
/// </summary> | |
/// <typeparam name="TEntityType"></typeparam> | |
/// <typeparam name="TKey">The type of the key.</typeparam> | |
/// <param name="keyExpression">A lambda expression representing the property to be configured.</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
public class YourPlatformSpecificPresenter : PlatformSpecificMvxPresenter, IMvxViewPresenterWithDelegate { | |
public MvxViewPresenterDelegate Delegate { get; } = new MvxViewPresenterDelegate(); | |
public YourPlatformSpecificPresenter() { | |
this.AddPresentationHintHandler<MyPresentationHint>(hint => { | |
// Do something | |
}); | |
} | |
public override void ChangePresentation(MvxPresentationHint hint) { |
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 static class MonoDroidHelper { | |
/// <summary> | |
/// Returns true if the current <paramref name="javaObj"/> | |
/// does not have a <see cref="IJavaObject.Handle"/> to the | |
/// object in the Java VM. | |
/// </summary> | |
public static bool IsInMonoLimbo<T>(this T javaObj) where T : class, IJavaObject { | |
return javaObj.Handle == IntPtr.Zero; | |
} |
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 static class DateTimeFormat { | |
public static bool Is24Hour { | |
get { return CultureInfo.CurrentCulture.DateTimeFormat.LongTimePattern.Contains("H"); } | |
} | |
} |
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 static class DateTimeEx { | |
private static IDateTimeProvider _provider; | |
public static DateTime Now { | |
get { | |
if (_provider == null && !Mvx.TryResolve(out _provider)) { | |
return DateTime.Now; | |
} | |
return _provider.Now; |
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
/// <summary> | |
/// Like an MvxImageView, but with a transition. | |
/// | |
/// Set the background drawable to your placeholder | |
/// image. | |
/// </summary> | |
public class MslImageView : ImageView { | |
private readonly IMvxImageHelper<Bitmap> _imageHelper; | |
private int _transitionDuration = 300; |
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 App : Cirrious.MvvmCross.ViewModels.MvxApplication { | |
public override void Initialize() { | |
Mvx.LazyConstructAndRegisterSingleton<IHttpClientFactory, DefaultHttpClientFactory>(); | |
RegisterAppStart(new AppStart()); | |
} | |
} |
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
/** | |
* defaults.less | |
*/ | |
div.my-class-name { | |
padding: 15px; | |
form { | |
padding: 10px; | |
} |
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
/// <summary> | |
/// Defines an interface which upgrades | |
/// the application from a version which is great | |
/// or equal to <see cref="IUpgrade.FromVersion"/> | |
/// and before <see cref="IUpgrade.ToVersion"/>. | |
/// </summary> | |
public interface IUpgrade { | |
Version FromVersion { get; } | |
Version ToVersion { get; } |
NewerOlder