Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.SelfDiagnostics.MemoryMappedFileHandler
MemoryMappedFileHandler open a MemoryMappedFile of a certain size at a certain file path.
The class provides a stream object with proper write position.
The stream is cached in ThreadLocal to be thread-safe.
namespace Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.SelfDiagnostics
{
internal class MemoryMappedFileHandler : IDisposable
{
public static readonly byte[] MessageOnNewFile;
public string LogDirectory { get; set; }
public int LogFileSize { get; }
public string CurrentFilePath { get; }
public void CreateLogFile(string logDirectory, int fileSize);
public void CloseLogFile();
public void Dispose();
public virtual void Write(byte[] buffer, int byteCount);
public MemoryMappedFileHandler();
}
}