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
public class Global : System.Web.HttpApplication { | |
protected void Application_Start(object sender, EventArgs e) { | |
var store = new SmartMessageStore(); | |
DependencyResolver.Register(typeof(IMessageStore), () => store); | |
} | |
} |
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
<%@ Page Language="C#" Debug="true" %> | |
<% | |
var exePath = @"C:\Program Files (x86)\Git\bin\sh.exe"; | |
var working = @"C:\Program Files (x86)\Git\bin"; | |
var args = "-c ls"; | |
var psi = new System.Diagnostics.ProcessStartInfo { | |
FileName = exePath, | |
WorkingDirectory = working, |
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 System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using SignalR.Hubs; | |
namespace Server | |
{ | |
public class MyHub : Hub | |
{ | |
public void Foo() |
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
var config = new HttpSelfHostConfiguration("http://localhost:8081"); | |
config.TransferMode = TransferMode.StreamedResponse; | |
config.Routes.MapConnection<MyConnection>("Echo", "echo/{*operation}"); | |
config.Routes.MapConnection<Raw>("Raw", "raw/{*operation}"); | |
var dispatcher = new PersistentConnectionDispatcher(config); | |
var server = new HttpSelfHostServer(config, dispatcher); | |
server.OpenAsync().Wait(); |
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
/*! | |
* SignalR JavaScript Library v0.5 | |
* http://signalr.net/ | |
* | |
* Copyright David Fowler and Damian Edwards 2012 | |
* Licensed under the MIT. | |
* https://github.com/SignalR/SignalR/blob/master/LICENSE.md | |
*/ | |
/// <reference path="jquery-1.6.2.js" /> |
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
// From http://msdn.microsoft.com/en-us/magazine/cc163467.aspx | |
internal class AsyncResult : IAsyncResult | |
{ | |
// Fields set at construction which never change while | |
// operation is pending | |
readonly AsyncCallback m_AsyncCallback; | |
readonly Object m_AsyncState; | |
// Fields set at construction which do change after | |
// operation completes |
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
// --- outside of the user controls, e.g. on the container page --- | |
$(function() { | |
window.hubReady = $.connection.hub.start(); | |
}); | |
// --- in your other pages --- | |
$(function() { | |
window.hubReady.done(function() { | |
// call hub method | |
}); |
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
diff --git a/Imports/SignalR/SignalR.Client/Http/DefaultHttpClient.cs b/Imports/SignalR/SignalR.Client/Http/DefaultHttpClient.cs | |
index 345a30f..3999ed6 100644 | |
--- a/Imports/SignalR/SignalR.Client/Http/DefaultHttpClient.cs | |
+++ b/Imports/SignalR/SignalR.Client/Http/DefaultHttpClient.cs | |
@@ -17,8 +17,12 @@ public class DefaultHttpClient : IHttpClient | |
/// <returns>A <see cref="Task{IResponse}"/>.</returns> | |
public Task<IResponse> GetAsync(string url, Action<IRequest> prepareRequest) | |
{ | |
- return HttpHelper.GetAsync(url, request => prepareRequest(new HttpWebRequestWrapper(request))) | |
- .Then(response => (IResponse)new HttpWebResponseWrapper(response)); |
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 System; | |
using System.Diagnostics; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace ConsoleApplication3 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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 System; | |
using System.Linq; | |
using System.Diagnostics; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Collections.Generic; | |
namespace ConsoleApplication3 | |
{ | |
class Program |