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 wr = WebRequest.Create("http://localhost:39472/Provisioning.svc/setup"); | |
wr.Method = "POST"; | |
wr.Headers.Add("P-DeviceId", this.deviceId); | |
using (var wq = (HttpWebResponse)wr.GetResponse()) | |
{ | |
if (wq.StatusCode == HttpStatusCode.OK) | |
{ | |
settings.DeviceAccount = wq.Headers["P-DeviceAccount"]; | |
settings.DeviceKey = wq.Headers["P-DeviceKey"]; | |
settings.DeviceSubscriptionUri = new Uri(wq.Headers["P-DeviceSubscriptionUri"]); |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace BackgroundWorker | |
{ | |
using System.Threading; | |
using Microsoft.ServiceBus; | |
using Microsoft.ServiceBus.Messaging; |
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
namespace CorrelationSite.Controllers | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
using System.Web.Mvc; | |
using CorrelationSite.Models; | |
using Microsoft.ServiceBus.Messaging; |
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
// The scoping model in "catch" doesn't allow for async/await handling because | |
// catch needs to be able to rethrow without messaging up the stack frame, i.e. "throw;" | |
// There's obviously an alternate non-goto solution here with a result variable and a | |
// subsequent switch on that result, but if you code that up, the switch looks like | |
// a longer, uglier variant of the gotos. | |
static async Task LoopedReceive(Func<Task<BrokeredMessage>> receiveCallbackAsync, | |
Func<BrokeredMessage, Task<bool>> messageReceivedCallbackAsync, | |
CancellationToken token) | |
{ |
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
namespace Sagas | |
{ | |
using System; | |
using System.Collections.Generic; | |
class Program | |
{ | |
static ActivityHost[] processes; |
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
namespace MartVue.Common | |
{ | |
using System; | |
using System.Runtime.Serialization; | |
using System.Threading.Tasks; | |
using Microsoft.ServiceBus.Messaging; | |
public static class RobustSendExtension | |
{ | |
static readonly TaskFactory TaskFactory = new TaskFactory(); |
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 interface ISomeExtension | |
{ | |
object Private { get; set; } | |
} | |
public static class SomeExtension | |
{ | |
class State | |
{ | |
public string data; |
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
namespace Writing | |
{ | |
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Threading; | |
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
namespace ConsoleApplication2 | |
{ | |
using System; | |
using System.Configuration; | |
using Microsoft.ServiceBus; | |
using Microsoft.ServiceBus.Messaging; | |
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
namespace ConsoleApplication2 | |
{ | |
using System; | |
using System.Configuration; | |
using Microsoft.ServiceBus; | |
using Microsoft.ServiceBus.Messaging; | |
class Program | |
{ | |
static void Main(string[] args) |
OlderNewer