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
/// <summary> | |
/// Retry the source using a separate Observable to determine whether to retry again or not. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="source"></param> | |
/// <param name="retryObservable">The observable factory used to determine whether to retry again or not. Number of retries & exception provided as parameters</param> | |
/// <param name="executeScheduler">The scheduler to be used to observe the source on. If non specified MainThreadScheduler used</param> | |
/// <param name="retryScheduler">The scheduler to use for the retry to be observed on. If non specified MainThreadScheduler used.</param> | |
/// <returns></returns> | |
public static IObservable<T> Retry<T>(this IObservable<T> source,Func<int,Exception, IObservable<bool>> retryObservable,IScheduler executeScheduler=null,IScheduler retryScheduler=null) |
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
public class AutofacDependencyResolver : IMutableDependencyResolver | |
{ | |
private readonly IContainer _container; | |
public AutofacDependencyResolver(IContainer container) | |
{ | |
_container = container; | |
} | |
public void Dispose() |
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
public IObservable<GeoLocation> CurrentLocationObservable(LocationOptions options) | |
{ | |
IObservable<GeoLocation> observable = null; | |
if (!_observables.TryGetValue(options,out observable)) | |
{ | |
var coordinates = new Subject<GeoLocation> (); | |
var geoInstance = new GeoInstance (coordinates, options); |
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 System.Collections.Generic; | |
using Android.Runtime; | |
using System.ComponentModel; | |
using System.Reactive.Subjects; | |
using System.Reactive; | |
using ReactiveUI; | |
namespace ReactiveUI.Framework.Android | |
{ |
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
Attempting to gather dependencies information for package 'AutoMapper.4.2.1' with respect to project 'AutomapperAndroidInstallIssue', targeting 'MonoAndroid,Version=v6.0' | |
Attempting to resolve dependencies for package 'AutoMapper.4.2.1' with DependencyBehavior 'Lowest' | |
Resolving actions to install package 'AutoMapper.4.2.1' | |
Resolved actions to install package 'AutoMapper.4.2.1' | |
Adding package 'Microsoft.CSharp.4.0.0' to folder 'E:\Temp\AutomapperAndroidInstallIssue\packages' | |
Added package 'Microsoft.CSharp.4.0.0' to folder 'E:\Temp\AutomapperAndroidInstallIssue\packages' | |
Added package 'Microsoft.CSharp.4.0.0' to 'packages.config' | |
Successfully installed 'Microsoft.CSharp 4.0.0' to AutomapperAndroidInstallIssue | |
Adding package 'System.Collections.4.0.10' to folder 'E:\Temp\AutomapperAndroidInstallIssue\packages' | |
Added package 'System.Collections.4.0.10' to folder 'E:\Temp\AutomapperAndroidInstallIssue\packages' |
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
var commandContext = new CommandContext | |
{ | |
ActivityOptions = | |
ActivityOptions.MakeSceneTransitionAnimation(context, new Pair(imageView, FoodVenue.ViewNameImageView)) | |
}; | |
currentActivity.StartActivity(intent,commandContext.ActivityOptions.ToBundle()); | |
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
public static class RetryWithConditionMixins | |
{ | |
/// <summary> | |
/// Retry with condition observable. | |
/// </summary> | |
/// <typeparam name="TIn"></typeparam> | |
/// <typeparam name="TOut"></typeparam> | |
/// <param name="source"></param> | |
/// <param name="selector">The selector function which potentially can be retried</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
public sealed partial class MainPage : Page | |
{ | |
public MainPage() | |
{ | |
this.InitializeComponent(); | |
this.Loaded += MainPage_Loaded; | |
} | |
private void MainPage_Loaded(object sender, RoutedEventArgs e) |
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
/// <summary> | |
/// Task Extensions | |
/// </summary> | |
public static class TaskExtensions | |
{ | |
/// <summary> | |
/// Enable cancellation for a task for which cancellation tokens can't be specified. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="task"></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
# Insert code here to change to directory where you wish to download videos if you so desire | |
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$a = ([xml](new-object net.webclient).downloadstring("http://s.ch9.ms/Events/dotnetConf/2015/RSS/mp4high")) | |
$a.rss.channel.item | foreach{ | |
$url = New-Object System.Uri($_.enclosure.url) | |
$file = "- " + $_.creator + " - " + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-").Replace("<", "").Replace("|", "").Replace('"',"").Replace("*","") | |
$file = $file.substring(0, [System.Math]::Min(120, $file.Length)) | |
$file = $file.trim() | |
NewerOlder