LogRecordSequence Constructor (String, FileMode, FileAccess)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the LogRecordSequence class with a specified path to the log store and the access and share modes.

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

public LogRecordSequence(
	string path,
	FileMode mode,
	FileAccess access
)

Parameters

path
Type: System.String

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

mode
Type: System.IO.FileMode

One of the FileMode values that determines how to open or create the store.

access
Type: System.IO.FileAccess

One of the FileAccess values that determines how the file can be accessed by the LogStore.

Exception Condition
ArgumentNullException

path is null.

ArgumentException

path is an empty string ("").

-or-

path contains only white space.

-or-

path contains one or more invalid characters.

ArgumentOutOfRangeException

mode contains an invalid value.

FileNotFoundException

The file cannot be found.

IOException

An I/O error occurs when opening the log store.

UnauthorizedAccessException

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

NotSupportedException

This operation is not supported.

OutOfMemoryException

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

PlatformNotSupportedException

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.

This constructor initializes a new LogRecordSequence on a new LogStore object that it opens with the specified path, mode, and access. The store is opened sharing Read access.

.NET Framework
Available since 3.0
Return to top
Show: