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 interface IApplication { | |
// either may throw exception | |
IAsyncResult BeginInvoke(IRequest request, AsyncCallback callback, object state); | |
IResponse EndInvoke(IAsyncResult result); | |
} |
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
// this snippet assumes the IAsyncResult implementation provided here: | |
// http://msdn.microsoft.com/en-us/magazine/cc163467.aspx | |
using System; | |
using Owin; | |
namespace TransformMiddleware | |
{ | |
// Defines a tranformation of an HTTP context. | |
public interface IHttpTransform |
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.Disposables; | |
using System.IO; | |
using System.Linq; | |
using System.Threading; | |
namespace RxVsTplSamples | |
{ | |
public static partial class Extensions | |
{ |
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.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace Owin | |
{ | |
public struct OwinResponse | |
{ | |
public string Status; | |
public IDictionary<string, IEnumerable<string>> Headers; | |
public IEnumerable<object> Body; |
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.Disposables; | |
using System.Linq; | |
using System.Threading; | |
namespace RxVsTplSamples | |
{ | |
public class RxAsyncOperation<TArg, TResult> | |
{ | |
Func<TArg, IObservable<TResult>> operation; |
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 System.Linq; | |
using System.Text; | |
namespace ParserDriver | |
{ | |
public class Parser | |
{ | |
public string Method; |
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; | |
namespace Kayak.Http | |
{ | |
public class HttpRequestEventArgs : EventArgs | |
{ | |
public IHttpServerRequest Request { get; internal set; } | |
public IHttpServerResponse Response { get; internal set; } | |
} |
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 Kayak.Http; | |
// utterly, completely, maximally untested sketch of an OWIN-Kayak adapter. | |
namespace Gate.Kayak | |
{ | |
using Application = | |
Action< | |
IDictionary<string, object>, |
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; | |
namespace Kayak.Http | |
{ | |
public struct HttpRequestHead | |
{ | |
public string Method; | |
public string Uri; | |
public Version Version; |
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
/* | |
I have a piece of .NET code that uses Asynchronous sockets that I want to cross | |
compile and run on Mono, however, when I attempt to run it, the AsyncCallback for | |
the BeginSend never gets called. I've boiled down the problem to a very simple | |
example. The example does not ever hit the callback, I have tried the following | |
configurations: | |
OS: Ubuntu 10.10 (Maverick Meerkat) | |
Mono 2.8.2 using Nathan Bridgewater's install shell script | |
Mono 2.10.2 using Nathan Bridgewater's updated shell script |
OlderNewer