Export (0) Print
Expand All

LogRecordSequence Constructor (String, FileMode, FileAccess, FileShare, Int32, Int32, FileSecurity)

Initializes a new instance of the LogRecordSequence class.

Namespace:  System.IO.Log
Assembly:  System.IO.Log (in System.IO.Log.dll)

public LogRecordSequence(
	string path,
	FileMode mode,
	FileAccess access,
	FileShare share,
	int bufferSize,
	int bufferCount,
	FileSecurity fileSecurity


Type: System.String

A relative or absolute path for the base file of the log store to open.

Type: System.IO.FileMode

A valid FileMode value that determines how to open or create the store.

Type: System.IO.FileAccess

A valid FileAccess value that determines how the log store can be accessed.

Type: System.IO.FileShare

A valid FileShare value that determines how the log store will be shared among processes.

Type: System.Int32

The desired buffer size in bytes. The buffer size determines the maximum size of the record that can be appended or read.

Type: System.Int32

The desired number of buffers.

Type: System.Security.AccessControl.FileSecurity

A valid FileSecurity value that specifies the security to set on the newly created store if the store must be created.


The file specified by path is not valid.


The specified log store file name is not valid.


mode has a value of CreateNew, and cannot be used without write access.


mode has a value of OpenOrCreate, and cannot be used without write access.


One or more of the arguments are null.


One or more of the arguments are out of range.


The file specified by path cannot be found.


The request could not be performed because of an unexpected I/O exception.


The file specified by path cannot be accessed because it is in use by another process.


The file specified by path cannot be created because the file or directory already exists.


The log handle could not be bound to the thread pool.


The specified log file format or version is invalid.


This operation is not supported.


The method was called after the sequence has been disposed of.


There is not enough memory to continue the execution of the program.


LogRecordSequence cannot be used because the required Common Log File System (CLFS) component is not installed. Install the CLFS component if it is available for your platform, or use the FileRecordSequence class.


The record sequence is full.


Access for the specified log sequence is denied by the operating system.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft