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 Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using Raven.Client.Documents; | |
using Raven.Client.Documents.Session; | |
using StackExchange.Profiling; | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; |
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
private ISubject<string> _downloaderSubject = new Subject<string>(); | |
var processing = _downloaderSubject | |
.Select(url => Observable.FromAsync(x => downloader.GetData(url)) | |
.Catch((Exception ex) => Observable.Throw<JsonData>(ex).DelaySubscription(TimeSpan.FromMilliseconds(1000))) | |
.Retry(3) | |
.Catch<JsonData, Exception>(ex => | |
{ | |
_logger.Error("Failed to download", ex); | |
return Observable.Empty<JsonData>(); | |
})) |
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
// jquery append workaround for support of html5 elements in ajax in ie less that 9 | |
$(function () { | |
if ($.browser.msie && $.browser.version < 9) { | |
$.fn.append = function () { | |
this.domManip(arguments, true, function (E) { | |
if (this.nodeType == 1) { | |
if (E.nodeType == 11) E = innerShiv(E, false); | |
if (E.nodeType) { |