title: How to check if Worker Role is running in Azure Emulator
body: <p>I was wondering if there was a way to check if the worker role was running inside the emulator. I have 2 worker roles and one of them shouldn't run locally, but since they are both in the same Azure Cloud Project, they both run.</p>
  
  <p>One way around it is to use <code>#if !DEBUG</code> and surround all the code inside the main loop, but it feels wrong.</p>
  
  <p>Is there something like ASP.Net's <code>Request.IsLocal</code>?</p>
  
  <p><strong>Vote To Reopen</strong>: While I have no doubt that this question is a duplicate in the strictest sense of the meaning, the question linked from here uses only the old terminology and would never have been found by a person searching today for the Windows Azure terms and namings that are currently used by the SDK.</p>