LogExtentCollection.Remove Method

Definition

Removes a LogExtent instance from the collection.

Overloads

Remove(LogExtent, Boolean)

Removes the specified LogExtent instance from the collection.

Remove(String, Boolean)

Removes the LogExtent instance with the specified path from the collection.

Remove(LogExtent, Boolean)

Removes the specified LogExtent instance from the collection.

public:
 void Remove(System::IO::Log::LogExtent ^ extent, bool force);
public void Remove (System.IO.Log.LogExtent extent, bool force);
member this.Remove : System.IO.Log.LogExtent * bool -> unit
Public Sub Remove (extent As LogExtent, force As Boolean)

Parameters

extent
LogExtent

The LogExtent instance to remove.

force
Boolean

true if the extent should be removed immediately; otherwise, false.

Exceptions

extent or force is null.

extent cannot be found in the collection.

extent cannot be removed. It is either still part of the active region, or access is denied.

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

-or-

extent cannot be deleted.

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

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

The record sequence is full.

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

Remarks

A LogExtent instance can be removed from the collection only if it is not part of the active region of the LogStore. If the force parameter is true and the extent cannot be removed immediately, an exception is thrown. If the force parameter is false and the extent cannot be removed immediately, the removal is deferred until it is no longer part of the active region.

You cannot remove the last extent in the LogExtentCollection, which means that the Count property cannot be zero once an extent has been added.

Applies to

Remove(String, Boolean)

Removes the LogExtent instance with the specified path from the collection.

public:
 void Remove(System::String ^ path, bool force);
public void Remove (string path, bool force);
member this.Remove : string * bool -> unit
Public Sub Remove (path As String, force As Boolean)

Parameters

path
String

The path of the LogExtent instance to remove.

force
Boolean

true if the extent should be removed immediately; otherwise, false.

Exceptions

path or force is null.

The extent specified by path cannot be found in the collection.

The extent specified by path cannot be removed. It is either still part of the active region, or access is denied.

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

-or-

The extent specified by path cannot be deleted.

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

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

The record sequence is full.

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

Remarks

A LogExtent instance can be removed from the collection only if it is not part of the active region of the LogStore. If the force parameter is true and the extent cannot be removed immediately, an exception is thrown. If the force parameter is false and the extent cannot be removed immediately, the removal is deferred until it is no longer part of the active region.

You cannot remove the last extent in the LogExtentCollection, which means that the Count property cannot be zero once an extent has been added.

Applies to