コード例 #1
0
ファイル: Results.cs プロジェクト: SteGriff/NCover
        /// <summary>
        /// Indicates that a coverage point has been reached relating to the specific report.
        /// </summary>
        /// <param name="reportname">The reportname.</param>
        /// <param name="outputfile">The outputfile.</param>
        /// <param name="point">The point.</param>
        /// <returns></returns>
		public static bool Add(string reportname, string outputfile, int point)
		{
			bool result = true;
			
			ResultLogger logger = (ResultLogger)results[reportname];

            if (logger == null)
            {
                lock (_createLock)
                {
                    logger = (ResultLogger)results[reportname];

                    if (logger == null)
                    {
                        logger = new ResultLogger(reportname, outputfile);
                        results[reportname] = logger;
                    }
                }
            }

			try
			{
                logger.AddPoint(point);
			}
			catch
			{
				result = false;
			}

			return result;
		}
コード例 #2
0
ファイル: CodeFile.cs プロジェクト: SteGriff/NCover
		public static void AddReport(string reportname, string outputfile)
		{
			ResultLogger logger = new ResultLogger(reportname, outputfile);
			results[reportname] = logger;
		}