http://www.windowsazure.com/en-us/documentation/articles/web-sites-create-web-jobs
https://github.com/projectkudu/kudu/wiki/Web-jobs
http://www.hanselman.com/blog/IntroducingWindowsAzureWebJobs.aspx
// 1. Return identifiers using out parameter | |
public interface ITenantResolver<TTenant> | |
{ | |
Task<TTenant> Resolve(string identifier, out string[] tenantIdentifiers); | |
} | |
// 2. Return ResolvedTenant object containing identifiers | |
public interface ITenantResolver<TTenant> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Baseline</title> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<link href='http://fonts.googleapis.com/css?family=Libre+Baskerville' rel='stylesheet' type='text/css'> | |
<link rel="stylesheet/less" type="text/css" href="styles.less" /> | |
<script src="less.js" type="text/javascript"></script> | |
</head> |
public async void Run() | |
{ | |
var orderId = await GenerateId<Order>(); | |
var order = new Order(orderId, 10.99); | |
session.Store(order); | |
session.SaveChanges(); | |
} | |
protected async Task<string> GenerateId<TEntity>() |
using NSubstitute; | |
using NUnit.Framework; | |
using System.Collections.ObjectModel; | |
using System.Net; | |
using System.Net.Http; | |
using System.Security.Claims; | |
using System.Security.Principal; | |
using System.Threading; | |
using System.Web.Http; | |
using System.Web.Http.Controllers; |
public static class StructureMapConfig | |
{ | |
public static void Register() | |
{ | |
ObjectFactory.Initialize(cfg => | |
{ | |
cfg.Scan(scan => | |
{ | |
scan.LookForRegistries(); | |
scan.TheCallingAssembly(); |
public interface IEntityStore | |
{ | |
TEntity Get(Guid id) where TEntity : Entity | |
IQueryable<TEntity> Query() where TEntity : Entity | |
void Store<TEntity>(TEntity entity) where TEntity : Entity | |
void Delete<TEntity>(Guid id) where TEntity : Entity | |
} |
private static IBus ConfigureBus() | |
{ | |
return NServiceBus.Configure.With() | |
.DefaultBuilder() | |
.XmlSerializer() | |
.MsmqTransport() | |
.IsTransactional(false) | |
.PurgeOnStartup(true) | |
.UnicastBus() | |
.LoadMessageHandlers() |
public interface IDbSession | |
{ | |
IDbConnection Connection { get; } | |
} | |
public class SqlSession : IDbSession | |
{ | |
private static readonly object @lock = new object(); | |
private readonly string connectionString; |
using System.Net; | |
using System.Web.Mvc; | |
namespace Fabrik.Common.Web | |
{ | |
public class HijaxAttribute : ActionFilterAttribute | |
{ | |
public override void OnActionExecuting(ActionExecutingContext filterContext) | |
{ | |
if (CanBeHijaxed(filterContext)) |