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.Concurrent; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using SignalR.Infrastructure; | |
namespace SignalR |
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.Threading; | |
namespace SignalR.Infrastructure | |
{ | |
internal class LockedList<T> : List<T> | |
{ | |
private readonly ReaderWriterLockSlim _listLock = new ReaderWriterLockSlim(); |
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 static Task Interleave<T>(Func<T, Action, Task> before, Func<Task> after, T arg) | |
{ | |
var tcs = new TaskCompletionSource<object>(); | |
var tasks = new[] { | |
tcs.Task, | |
before(arg, () => after().ContinueWith(tcs)) | |
}; | |
return tasks.Return(); | |
} |
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
<form data-bind="submit: sendMessage"> | |
<input type="text" data-bind="value: newMessage" /> | |
<input type="submit" value="Send" /> | |
</form> | |
<ul data-bind="foreach: messages"> | |
<li data-bind="text: $data"></li> | |
</ul> | |
<script src="Scripts/jquery-1.8.1.js"></script> |
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 class SiteScrape : HttpTaskAsyncHandler | |
{ | |
public override async Task ProcessRequestAsync(HttpContext context) | |
{ | |
using (var http = new HttpClient()) | |
{ | |
var downloadTasks = new List<Task<string>> { | |
http.GetStringAsync("http://bing.com"), | |
http.GetStringAsync("http://google.com"), | |
http.GetStringAsync("http://oredev.org"), |
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 partial class AdHocModelBindingAnonType : System.Web.UI.Page | |
{ | |
protected dynamic Model { get; private set; } | |
protected void Page_Load() | |
{ | |
Model = ModelBindingExecutionContext.Bind(new { FirstName = "" }); | |
} | |
} |
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.Dynamic; | |
using System.Globalization; | |
using System.Linq; | |
using System.Reflection; | |
using System.Web; | |
using System.Web.ModelBinding; | |
namespace VS11BetaTAPWebForms |
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
<form data-bind="submit: sendMessage"> | |
<input type="text" data-bind="value: newMessage" /> | |
<input type="submit" value="Send" /> | |
</form> | |
<ul data-bind="foreach: messages"> | |
<li data-bind="text: $data"></li> | |
</ul> | |
<script src="Scripts/jquery-1.8.3.js"></script> |
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 hub is optional, it's not required for the client to work. | |
// The client's call to "all.newMessage" will result in this Hub's | |
// NewMessage method being called so it can persist the message. | |
public class Chat : Hub | |
{ | |
public void NewMessage(string message) | |
{ | |
MyDataLayer.SaveMessage(message); | |
} | |
} |
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
4th & Mayor - FourSqaure client | |
Add to Calendar - support for ICS files attached to emails | |
Amazon Kindle | |
Amazon Mobile - can't live without this as a Seattelite | |
AppoinTile - more detailed upcoming appointments/meetings tile | |
Baconit - reddit client | |
Battery Level for WP8 - let's you see detailed battery status from lock screen, home screen, etc. | |
CrashPlan - so I can check my cloud backups | |
Dictionary.com - to settle arguments | |
Engadget - tech news |
OlderNewer