- azurelight_sourcecode.zip
- Azurelight
- Azure
- Azurelight.sln
- Azurelight
- Azurelight
- Azurelight.ccproj
- Azurelight_WebRole
- ServiceConfiguration.cscfg
- ServiceDefinition.csdef
- Azurelight_WebRole
- AzurelightNav
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.DomainServices;
using Hanray.Azurelight.Model;
using Hanray.Azurelight.Service;
using Microsoft.Azure.StorageClient;
namespace Hanray.Azurelight
{
public class Global : System.Web.HttpApplication
{
ALTSDomainServiceFactory svcFactory = null;
protected void Application_Start(object sender, EventArgs e)
{
}
protected void Session_Start(object sender, EventArgs e)
{
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (null == svcFactory)
{
svcFactory = new ALTSDomainServiceFactory();
DomainService.Factory = svcFactory;
//needs programmatically create Azure table when it's not there
//TableStorage.CreateTablesFromModel(typeof(SurveyDataContext));
}
}
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
}
protected void Application_Error(object sender, EventArgs e)
{
}
protected void Session_End(object sender, EventArgs e)
{
}
protected void Application_End(object sender, EventArgs e)
{
}
}
public class ALTSDomainServiceFactory : IDomainServiceFactory
{
public DomainService CreateDomainService(Type domainServiceType, DomainServiceContext context)
{
if (domainServiceType == typeof(SurveyService))
{
SurveyService riaSvc = new SurveyService();
riaSvc.Initialize(context);
return riaSvc;
}
return null;
}
public void ReleaseDomainService(DomainService domainService)
{
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.