public static void Stop() { lock (sync) { HttpRuntime.Cache.Remove(instance._cacheKey); instance = null; } }
public static void Start(string applicationUrl) { if (IsKeepingAlive) { return; } lock (sync) { instance = new KeepAliveManager(applicationUrl); instance.Insert(); } }
private KeepAliveManager(string applicationUrl) { _applicationUrl = applicationUrl; _cacheKey = Guid.NewGuid().ToString(); instance = this; }