public void DefineError(int id, int level, CompilationStage stage, string messageTemplate) { CodeContract.RequiresArgumentInRange(!m_errorInfoStore.Contains(id), "id", "Error id is duplicated"); var errorInfo = new CompilationErrorInfo(id, level, stage, messageTemplate); m_errorInfoStore.Add(errorInfo); }