Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SafePointerHandle.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Runtime.InteropServices
;
3
using
Microsoft.Win32.SafeHandles
;
4
5
namespace
Internal.Cryptography.Pal.Native
;
6
7
internal
abstract
class
SafePointerHandle
<T> :
SafeHandle
where T :
SafeHandle
, new()
8
{
9
public
sealed
override
bool
IsInvalid
=>
handle
==
IntPtr
.
Zero
;
10
11
public
static
T
InvalidHandle
=>
Microsoft
.
Win32
.
SafeHandles
.
SafeHandleCache
<T>.
GetInvalidHandle
(() =>
new
T
());
12
13
protected
SafePointerHandle
()
14
: base(
IntPtr
.Zero, ownsHandle: true)
15
{
16
}
17
18
protected
override
void
Dispose
(
bool
disposing)
19
{
20
if
(!
Microsoft
.
Win32
.
SafeHandles
.
SafeHandleCache
<T>.
IsCachedInvalidHandle
(
this
))
21
{
22
base.Dispose(disposing);
23
}
24
}
25
}
Internal.Cryptography.Pal.Native.SafePointerHandle.SafePointerHandle
SafePointerHandle()
Definition
SafePointerHandle.cs:13
Internal.Cryptography.Pal.Native.SafePointerHandle.IsInvalid
override bool IsInvalid
Definition
SafePointerHandle.cs:9
Internal.Cryptography.Pal.Native.SafePointerHandle.InvalidHandle
static T InvalidHandle
Definition
SafePointerHandle.cs:11
Internal.Cryptography.Pal.Native.SafePointerHandle.Dispose
override void Dispose(bool disposing)
Definition
SafePointerHandle.cs:18
Internal.Cryptography.Pal.Native.SafePointerHandle
Definition
SafePointerHandle.cs:8
Microsoft.Win32.SafeHandles.SafeHandleCache.GetInvalidHandle
static T GetInvalidHandle(Func< T > invalidHandleFactory)
Definition
SafeHandleCache.cs:11
Microsoft.Win32.SafeHandles.SafeHandleCache.IsCachedInvalidHandle
static bool IsCachedInvalidHandle(SafeHandle handle)
Definition
SafeHandleCache.cs:31
Microsoft.Win32.SafeHandles.SafeHandleCache
Definition
SafeHandleCache.cs:8
System.Runtime.InteropServices.SafeHandle.handle
IntPtr handle
Definition
SafeHandle.cs:8
System.Runtime.InteropServices.SafeHandle
Definition
SafeHandle.cs:7
Internal.Cryptography.Pal.Native
Definition
CERT_BASIC_CONSTRAINTS2_INFO.cs:1
Microsoft.Win32.SafeHandles
Definition
SafeProcessHandle.cs:3
Microsoft.Win32
Definition
SafeProcessHandle.cs:3
Microsoft
Definition
AlphaTestEffect.cs:1
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System.ConsoleKey.T
@ T
System
Definition
BlockingCollection.cs:8
System.IntPtr.Zero
static readonly IntPtr Zero
Definition
IntPtr.cs:18
System.IntPtr
Definition
IntPtr.cs:14
source
System.Security.Cryptography.X509Certificates
Internal.Cryptography.Pal.Native
SafePointerHandle.cs
Generated by
1.10.0