LogExtentCollection.Remove 方法

定义

从集合中移除 LogExtent 实例。Removes a LogExtent instance from the collection.

重载

Remove(LogExtent, Boolean)

从集合中移除指定的 LogExtent 实例。Removes the specified LogExtent instance from the collection.

Remove(String, Boolean)

从集合中移除具有指定路径的 LogExtent 实例。Removes the LogExtent instance with the specified path from the collection.

Remove(LogExtent, Boolean)

从集合中移除指定的 LogExtent 实例。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)

参数

extent
LogExtent

要移除的 LogExtent 实例。The LogExtent instance to remove.

force
Boolean

如果应立即移除范围,则为 true;否则为 falsetrue if the extent should be removed immediately; otherwise, false.

例外

extentforcenullextent or force is null.

在集合中找不到 extentextent cannot be found in the collection.

无法移除 extentextent cannot be removed. 它仍然是活动区域的一部分,或者拒绝访问。It is either still part of the active region, or access is denied.

由于出现意外的 I/O 异常,因此无法执行该请求。The request could not be performed because of an unexpected I/O exception.

-or- 无法删除 extentextent 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.

注解

只有在 LogExtent 实例不是 LogStore 活动区域的一部分时,才能将该实例从集合中移除。A LogExtent instance can be removed from the collection only if it is not part of the active region of the LogStore. 如果 force 参数为 true,并且无法立即移除范围,则会引发异常。If the force parameter is true and the extent cannot be removed immediately, an exception is thrown. 如果 force 参数为 false,并且无法立即移除范围,则会延迟移除操作,直到其不再是活动区域的一部分。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.

无法移除 LogExtentCollection 中的最后一个范围,这意味着在添加范围后 Count 属性不能为零。You cannot remove the last extent in the LogExtentCollection, which means that the Count property cannot be zero once an extent has been added.

Remove(String, Boolean)

从集合中移除具有指定路径的 LogExtent 实例。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)

参数

path
String

要移除的 LogExtent 实例的路径。The path of the LogExtent instance to remove.

force
Boolean

如果应立即移除范围,则为 true;否则为 falsetrue if the extent should be removed immediately; otherwise, false.

例外

pathforcenullpath or force is null.

在集合中找不到 path 指定的范围。The extent specified by path cannot be found in the collection.

无法移除 path 指定的范围。The extent specified by path cannot be removed. 它仍然是活动区域的一部分,或者拒绝访问。It is either still part of the active region, or access is denied.

由于出现意外的 I/O 异常,因此无法执行该请求。The request could not be performed because of an unexpected I/O exception.

- 或 --or- 无法删除 path 指定的范围。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.

注解

只有在 LogExtent 实例不是 LogStore 活动区域的一部分时,才能将该实例从集合中移除。A LogExtent instance can be removed from the collection only if it is not part of the active region of the LogStore. 如果 force 参数为 true,并且无法立即移除范围,则会引发异常。If the force parameter is true and the extent cannot be removed immediately, an exception is thrown. 如果 force 参数为 false,并且无法立即移除范围,则会延迟移除操作,直到其不再是活动区域的一部分。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.

无法移除 LogExtentCollection 中的最后一个范围,这意味着在添加范围后 Count 属性不能为零。You cannot remove the last extent in the LogExtentCollection, which means that the Count property cannot be zero once an extent has been added.

适用于