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
namespace RosleansSilo | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Threading.Tasks; | |
using Orleans; |
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
// NOTE: Add a COM reference to NetFwTypeLib | |
namespace Site.Setup | |
{ | |
using System; | |
using System.Linq; | |
using NetFwTypeLib; | |
/// <summary> |
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.Fabric.Replication; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using Microsoft.ServiceFabric.Data; | |
internal static class TransactionExtensions | |
{ |
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
"Don't expect this to compile - it's just a snippet" | |
/// <summary> | |
/// The chat room grain. | |
/// </summary> | |
[StorageProvider(ProviderName = "chats")] | |
[Reentrant] |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | |
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | |
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | |
The settings used within this ClusterManifest are expressly for use only | |
within a developer single-box environment. Any use of these settings outside | |
of that environment are highly likely to produce incorrect, and misperforming |
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
namespace Orleans.Azure.Silos | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Net; | |
using System.Reflection; | |
using Microsoft.WindowsAzure; |
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
// -------------------------------------------------------------------------------------------------------------------- | |
// <summary> | |
// The Azure JSON table storage provider. | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Grains.Utilities | |
{ | |
using System.Configuration; | |
using System.Threading.Tasks; |
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 async Task SendSms(string phoneNumber, string body) | |
{ | |
// Sanitize the phone number. | |
phoneNumber = Regex.Replace(phoneNumber, "[^0-9]", string.Empty); | |
// Build the request. | |
var builder = new UriBuilder("https://rest.nexmo.com/sms/json"); | |
var parameters = new Dictionary<string, string> | |
{ | |
{ "api_key", this.apiKey }, |
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 string GetSignature(string masterKey, string resourceId, string resourceType, string xDate = null, string date = null) | |
{ | |
if (string.IsNullOrEmpty(xDate) && string.IsNullOrEmpty(date)) | |
{ | |
throw new ArgumentException("Either xDate or date must be provided."); | |
} | |
const string AuthorizationFormat = "type={0}&ver={1}&sig={2}"; | |
const string MasterToken = "master"; | |
const string TokenVersion = "1.0"; |
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
// -------------------------------------------------------------------------------------------------------------------- | |
// <summary> | |
// Maintains a collection of <see cref="IGrainObserver" /> instances. | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Grains.Utilities | |
{ | |
using System; | |
using System.Collections; |