Skip to content

Instantly share code, notes, and snippets.

@stefansedich
Created October 5, 2011 10:02
Show Gist options
  • Select an option

  • Save stefansedich/1264081 to your computer and use it in GitHub Desktop.

Select an option

Save stefansedich/1264081 to your computer and use it in GitHub Desktop.
public void Start()
{
while(true)
{
using(var scope = _scope.BeginLifetimeScope())
{
var service = scope.Resolve<IWorkItemService>();
var workItem = service.GetNextWorkItem();
if (workItem != null)
{
Console.WriteLine("WorkItem Loaded: " + workItem.Id);
}
else
{
Thread.Sleep(1000);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment