SafeHandle.IsClosed Свойство
Определение
Получает значение, показывающее, является ли дескриптор закрытым.Gets a value indicating whether the handle is closed.
public:
property bool IsClosed { bool get(); };
public bool IsClosed { get; }
member this.IsClosed : bool
Public ReadOnly Property IsClosed As Boolean
Значение свойства
Значениеtrue
, если дескриптор закрыт, в противном случае — значение false
.true
if the handle is closed; otherwise, false
.
Комментарии
Метод возвращает значение, указывающее, больше не SafeHandle связан ли маркер объекта с машинным ресурсом. IsClosedThe IsClosed method returns a value indicating whether the SafeHandle object's handle is no longer associated with a native resource. Это отличается от определения IsInvalid свойства, которое определяет, всегда ли данный обработчик считается недопустимым.This differs from the definition of the IsInvalid property, which computes whether a given handle is always considered invalid. IsClosed Методtrue
возвращает значение в следующих случаях:The IsClosed method returns a true
value in the following cases:
Вызван SetHandleAsInvalid метод.The SetHandleAsInvalid method was called.
Вызван метод или Close метод, и в других потоках нет ссылок на SafeHandle объект. DisposeThe Dispose method or Close method was called and there are no references to the SafeHandle object on other threads.
Безопасность
SecurityPermission
разрешение на вызов неуправляемого кода.for permission to call unmanaged code. Действие по обеспечению безопасности: LinkDemand.Security action: LinkDemand. Связанное перечисление:UnmanagedCodeAssociated enumeration: UnmanagedCode