public static IEnumerable <ClrObject> EnumerateObjectsFromHeap(this IFilteredObjectsProvider filteredObjectProvider, IMemoryDumpConnectionPath connection, IClrRuntimeFactory runtimeFactory = null)
        {
            runtimeFactory = runtimeFactory ?? MDClrRuntimeFactory.Instance;

            var runtime = MDClrRuntimeFactory.Instance.BuildClrRuntime(connection);

            var heapObjects = HeapBasedClrObjectEnumerator.Instance;

            return(filteredObjectProvider.ExtractFromRuntime(runtime, heapObjects));
        }
        public static IEnumerable <T> EnumerateObjectsFromHeap <T>(this IFilteredObjectsProvider filteredObjectProvider, IMemoryDumpConnectionPath connection, IModelMapperFactory factory, IClrRuntimeFactory runtimeFactory = null) where T : class, IClrObjMappingModel
        {
            runtimeFactory = runtimeFactory ?? MDClrRuntimeFactory.Instance;

            var runtime = MDClrRuntimeFactory.Instance.BuildClrRuntime(connection);

            var heapObjects = HeapBasedClrObjectEnumerator.Instance;

            var stream = filteredObjectProvider.ExtractFromRuntime(runtime, heapObjects);

            foreach (var matched in stream)
            {
                yield return(factory.BuildOfType <T>(matched));
            }
        }
 public AllHttpWebRequest()
 {
     ObjectFilter = new FilteredObjectProviderByTypeName("System.Net.HttpWebRequest");
 }
 public static IEnumerable <IClrObjMappingModel> ExtractFromHeap(this IModelMapperFactory factory, IFilteredObjectsProvider clrObjectFilter, ClrRuntime runtime)
 {
     return(ExtractFromHeap(factory, new HeapBasedFacadeObjectEnumerator(clrObjectFilter), runtime));
 }
        public static IEnumerable <IClrObjMappingModel> ExtractFromHeap(this IModelMapperFactory factory, IFilteredObjectsProvider clrObjectFilter, IMemoryDumpConnectionPath connection)
        {
            var runtime = MDClrRuntimeFactory.Instance.BuildClrRuntime(connection);

            return(ExtractFromHeap(factory, clrObjectFilter, runtime));
        }
        public static IEnumerable <IClrObjMappingModel> ExtractFromHeap(this IModelMapperFactory factory, IFilteredObjectsProvider clrObjectFilter, string pathToDumpFile, string pathToMsCord = null)
        {
            if (string.IsNullOrEmpty(pathToMsCord))
            {
                MDClrRuntimeFactory.TryGetMscordacPath(pathToDumpFile, out pathToMsCord);
            }
            var connectionDetails = new MDFileConnection(pathToDumpFile, pathToMsCord);

            return(ExtractFromHeap(factory, clrObjectFilter, connectionDetails));
        }
Exemplo n.º 7
0
 public MvcRenderdingsWithoutCache()
 {
     ObjectFilter = new FilteredObjectProviderByTypeName("Sitecore.Mvc.Pipelines.Response.RenderRendering.RenderRenderingArgs");
 }
Exemplo n.º 8
0
 public RequestsGroupedByAnalyticsCookie(IEnumerateClrObjectsFromClrRuntime objectEnumerator, IFilteredObjectsProvider filter)
 {
     ObjectEnumerator = objectEnumerator;
     ObjectFilter     = filter;
 }
 /// <summary>
 /// Initializes a new instance of heap-based object enumerator with specific object filter.
 /// </summary>
 /// <param name="filteredObjectsProvider"></param>
 public HeapBasedFacadeObjectEnumerator(IFilteredObjectsProvider filteredObjectsProvider) : base(HeapBasedClrObjectEnumerator.Instance, filteredObjectsProvider)
 {
 }
Exemplo n.º 10
0
 public RequestsThatBeingProcessed()
 {
     ObjectEnumerator = new HeapBasedClrObjectEnumerator();
     ObjectFilter     = new FilteredObjectProviderByTypeName("System.Web.ThreadContext");
 }
        public static IEnumerable <ClrObject> EnumerateObjectsFromHeap(this IFilteredObjectsProvider filteredObjectProvider, string pathToMemoryDump, string pathToMsCord)
        {
            var connection = new MDFileConnection(pathToMemoryDump, pathToMsCord);

            return(EnumerateObjectsFromHeap(filteredObjectProvider, connection));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultObjectEnumerationFacade"/> class.
 /// </summary>
 /// <param name="clrObjectEnumerator">The color object enumerator.</param>
 /// <param name="filteredObjectsProvider">The filtered objects provider.</param>
 public DefaultObjectEnumerationFacade(IEnumerateClrObjectsFromClrRuntime clrObjectEnumerator, IFilteredObjectsProvider filteredObjectsProvider)
 {
     Contract.Requires(clrObjectEnumerator != null, nameof(clrObjectEnumerator));
     Contract.Requires(filteredObjectsProvider != null, nameof(filteredObjectsProvider));
     this.ClrObjectEnumerator     = clrObjectEnumerator;
     this.FilteredObjectsProvider = filteredObjectsProvider;
 }