There is a security discussion going-on at work as to whether the following DEPLOYED code below can be reached or "hoisted" into...even though it was built in RELEASE mode.
Thoughts?
EDIT:
I do "see" it in DotPeek - even after building in Release.
However, the file is "grayed-out"
Does that mean it won't execute?
DotPeek merely "decompiles" the code...it doesn't show you what code exists in the mode it is built-in...right?
THE CODE LOOKS LIKE:
using System;
using System.ServiceProcess;
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
#if DEBUG
var myservice = new StpListener();
myservice.OnDebug();
//KEEP the service alive
System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
#else
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new StpListener()
};
ServiceBase.Run(ServicesToRun);
#endif
}
}