public KanColleProxy()
{
this.compositeDisposable = new LivetCompositeDisposable();
this.connectableSessionSource = Observable
.FromEvent<SessionStateHandler, Session>(
action => new SessionStateHandler(action),
h => FiddlerApplication.AfterSessionComplete += h,
h => FiddlerApplication.AfterSessionComplete -= h)
.Publish();
this.apiSource = this.connectableSessionSource
.Where(s => s.PathAndQuery.StartsWith("/kcsapi"))
.Where(s => s.oResponse.MIMEType.Equals("text/plain"))
#region .Do(debug)
#if DEBUG
.Do(session =>
{
Debug.WriteLine("==================================================");
Debug.WriteLine("Fiddler session: ");
Debug.WriteLine(session);
Debug.WriteLine("");
})
#endif
#endregion
.Publish();
}