Database Reference
In-Depth Information
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Threading;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Diagnostics;
using Microsoft.WindowsAzure.ServiceRuntime;
using Microsoft.WindowsAzure.StorageClient;
using StudentClub_Info;
namespace StudentClub_WorkerRole
{
public class WorkerRole : RoleEntryPoint
{
private CloudQueue queue;
public override void Run()
{
//This is a sample worker implementation.
//Replace with your logic.
Trace.TraceInformation("Listening for queue
messages...");
while (true)
{
//Retrieve the message from the queue.
CloudQueueMessage msg = queue.GetMessage();
if (msg ! = null)
{
//Parse the message retrieved from the queue.
var messageParts = msg.AsString.Split(new char[]
{','});
var partitionKey = messageParts[0];
var rowkey = messageParts[1];
var membername = messageParts[2];
//Retreive entries in table storage.
StudentClubDataSource ds = new StudentClubData-
Source();
ds.GetStudentClubEntries(partitionKey);
//Remove the message from the queue.
queue.DeleteMessage(msg);
}
else
{
System.Threading.Thread.Sleep(1000);
}
}
}
 
Search WWH ::




Custom Search