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
protected override void RequestStartup(ILifetimeScope requestContainer, IPipelines pipelines, NancyContext context) | |
{ | |
pipelines.OnError.AddItemToEndOfPipeline((z, a) => | |
{ | |
log.Error("Unhandled error on request: " + context.Request.Url + " : " + a.Message, a); | |
return ErrorResponse.FromException(a); | |
}); | |
base.RequestStartup(requestContainer, pipelines, context); | |
} |
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
static IObservable<string> CheckForFraud(IObservable<string> logins) | |
{ | |
return from g in logins.GroupByUntil(l => l, CheckForFraud) | |
from c in g.Count() | |
where c >= 3 | |
select g.Key; | |
} | |
static IObservable<Unit> CheckForFraud(IGroupedObservable<string, string> g) | |
{ |
NewerOlder