protected ReportDefinitionCache(ReportDefinitionCache reportDefinitionCache)
 {
     fileName      = reportDefinitionCache.fileName;
     lastWriteTime = reportDefinitionCache.lastWriteTime;
     lastCheckTime = reportDefinitionCache.lastCheckTime;
     buffer        = reportDefinitionCache.buffer;
 }
        public static ReportDefinitionCache GetReportDefinition(string fileName)
        {
            ValidateFileName(fileName);

            ReportDefinitionCache reportDefinitionCache;

            lock (cache)
            {
                if (cache.Keys.Contains(fileName))
                {
                    reportDefinitionCache = cache[fileName];
                }
                else
                {
                    reportDefinitionCache = new ReportDefinitionCache(fileName);

                    cache.Add(fileName, reportDefinitionCache);
                }
            }

            return(reportDefinitionCache);
        }