void CompileCode() { // Done already? if (result != null && result.Code == Code) { return; } // Already requested? if (request != null) { if (request.Code == Code) { // The proper request is pending return; } request.Cancel(); // No need of this result } // Start a new request request = new CompileRequest(Code, AcceptCompileResult); }
void CompileCode() { // Done already? if (result != null && result.Code == Code) { return; } // Already requested? if (request != null) { if (request.Code == Code) { // The proper request is pending return; } request.Cancel (); // No need of this result } // Start a new request request = new CompileRequest (Code, AcceptCompileResult); }