Exemple #1
0
        private static void ProcessRouting(GeneralPolicyProcessor gpp, PolicyResponseObject pro)
        {
            Logger.LogTrace("ContentScanner: ProcessRouting ENTER");
            foreach (IContentItem contentItem in pro.ContentCollection)
            {
                Debug.Assert(1 == contentItem.PolicySetCollection.Count,
                             "This collection should only contain one policy set - we only passed one in (see constructor)");

                double size = contentItem.Size;
                PerformanceCounters.Instance.StartTimer(PerformanceCounters.CounterType.ContentScanRoutingSize);
                PerformanceCounters.Instance.StartTimer(PerformanceCounters.CounterType.ContentScanRouting);
                gpp.ProcessRouting(contentItem, contentItem.PolicySetCollection[0]);
                PerformanceCounters.Instance.StopTimer(PerformanceCounters.CounterType.ContentScanRouting, 0);
                PerformanceCounters.Instance.StopTimer(PerformanceCounters.CounterType.ContentScanRoutingSize, size);
            }
            Logger.LogTrace("ContentScanner: ProcessRouting EXIT");
        }
		private static void ProcessRouting(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;
				}
				
				Debug.Assert(1 == contentItem.PolicySetCollection.Count, "This collection should only contain one policy set - we only passed one in (see constructor)");

				double size = contentItem.Size;
				PerformanceCounters.Instance.StartTimer(PerformanceCounters.CounterType.ContentScanRoutingSize);
				PerformanceCounters.Instance.StartTimer(PerformanceCounters.CounterType.ContentScanRouting);
				gpp.ProcessRouting(contentItem, contentItem.PolicySetCollection[0]);
				PerformanceCounters.Instance.StopTimer(PerformanceCounters.CounterType.ContentScanRouting, 0);
				PerformanceCounters.Instance.StopTimer(PerformanceCounters.CounterType.ContentScanRoutingSize, size);
			}
		}