Exemple #1
0
 private static void ProcessExpressions(GeneralPolicyProcessor gpp, PolicyResponseObject pro)
 {
     Logger.LogTrace("ContentScanner: ProcessExpressions ENTER");
     foreach (IContentItem contentItem in pro.ContentCollection)
     {
         double size = contentItem.Size;
         PerformanceCounters.Instance.StartTimer(PerformanceCounters.CounterType.ContentScanExpressionSize);
         PerformanceCounters.Instance.StartTimer(PerformanceCounters.CounterType.ContentScanExpression);
         gpp.ProcessFileInfo(contentItem);
         PerformanceCounters.Instance.StopTimer(PerformanceCounters.CounterType.ContentScanExpression, 0);
         PerformanceCounters.Instance.StopTimer(PerformanceCounters.CounterType.ContentScanExpressionSize, size);
     }
     Logger.LogTrace("ContentScanner: ProcessExpressions EXIT");
 }
		private static void ProcessExpressions(GeneralPolicyProcessor gpp, PolicyResponseObject pro)
		{
			foreach (IContentItem contentItem in pro.ContentCollection)
			{
                if (contentItem.Properties.ContainsKey("SkipScanning")
                    && (string.Equals(contentItem.Type, "PDFDocument", StringComparison.InvariantCultureIgnoreCase)
                        || contentItem.Properties.ContainsKey("ReadProtected")
                       )
                   )
				{
					continue;
				}
				
				double size = contentItem.Size;
				PerformanceCounters.Instance.StartTimer(PerformanceCounters.CounterType.ContentScanExpressionSize);
				PerformanceCounters.Instance.StartTimer(PerformanceCounters.CounterType.ContentScanExpression);
				gpp.ProcessFileInfo(contentItem);
				PerformanceCounters.Instance.StopTimer(PerformanceCounters.CounterType.ContentScanExpression, 0);
				PerformanceCounters.Instance.StopTimer(PerformanceCounters.CounterType.ContentScanExpressionSize, size);
			}
		}