Class MiniDump
Provides functionality to create Windows minidump files for diagnostic purposes.
Inheritance
Namespace: Umbraco.Cms.Core.Diagnostics
Assembly: Umbraco.Core.dll
Syntax
public static class MiniDump
Remarks
This class enables the creation of memory dump files that can be analyzed to diagnose application crashes and other issues.
Based on: https://blogs.msdn.microsoft.com/dondu/2010/10/24/writing-minidumps-in-c/ and https://blogs.msdn.microsoft.com/dondu/2010/10/31/writing-minidumps-from-exceptions-in-c/ which itself got it from http://blog.kalmbach-software.de/2008/12/13/writing-minidumps-in-c/
Methods
View SourceDump(IMarchal, IHostingEnvironment, Option, bool)
Creates a minidump file in the MiniDump directory.
Declaration
public static bool Dump(IMarchal marchal, IHostingEnvironment hostingEnvironment, MiniDump.Option options = Option.WithFullMemory, bool withException = false)
Parameters
| Type | Name | Description |
|---|---|---|
| IMarchal | marchal | The marshalling interface for getting exception pointers. |
| IHostingEnvironment | hostingEnvironment | The hosting environment for path resolution. |
| MiniDump.Option | options | The dump options specifying what information to include. |
| bool | withException | Whether to include exception information in the dump. |
Returns
| Type | Description |
|---|---|
| bool |
|
OkToDump(IHostingEnvironment)
Determines whether it is safe to create a new dump file.
Declaration
public static bool OkToDump(IHostingEnvironment hostingEnvironment)
Parameters
| Type | Name | Description |
|---|---|---|
| IHostingEnvironment | hostingEnvironment | The hosting environment for path resolution. |
Returns
| Type | Description |
|---|---|
| bool |
|
Remarks
This method limits the number of dump files to prevent disk space exhaustion.