Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
HasDeclSecurityTag.cs
Go to the documentation of this file.
1
using
System.Runtime.CompilerServices
;
2
3
namespace
System.Reflection.Metadata.Ecma335
;
4
5
internal
static
class
HasDeclSecurityTag
6
{
7
internal
const
int
NumberOfBits
= 2;
8
9
internal
const
int
LargeRowSize
= 16384;
10
11
internal
const
uint
TypeDef
= 0u;
12
13
internal
const
uint
MethodDef
= 1u;
14
15
internal
const
uint
Assembly
= 2u;
16
17
internal
const
uint
TagMask
= 3u;
18
19
internal
const
TableMask
TablesReferenced
= TableMask.TypeDef | TableMask.MethodDef |
TableMask
.Assembly;
20
21
internal
const
uint
TagToTokenTypeByteVector
= 2098690u;
22
23
[
MethodImpl
(
MethodImplOptions
.AggressiveInlining)]
24
internal
static
EntityHandle
ConvertToHandle
(uint hasDeclSecurity)
25
{
26
uint num = (uint)(2098690 >>> (
int
)((hasDeclSecurity & 3) << 3) << 24);
27
uint num2 = hasDeclSecurity >> 2;
28
if
(num == 0 || (num2 & 0xFF000000u) != 0)
29
{
30
Throw
.
InvalidCodedIndex
();
31
}
32
return
new
EntityHandle
(num | num2);
33
}
34
35
internal
static
uint
ConvertToTag
(
EntityHandle
handle
)
36
{
37
uint
type
=
handle
.Type;
38
uint rowId = (uint)
handle
.RowId;
39
return
(
type
>> 24)
switch
40
{
41
2u => (rowId << 2) | 0u,
42
6u => (rowId << 2) | 1u,
43
32u => (rowId << 2) | 2u,
44
_ => 0u,
45
};
46
}
47
}
System.Reflection.Assembly
Definition
Assembly.cs:16
System.Reflection.Metadata.Ecma335.HasDeclSecurityTag.TagToTokenTypeByteVector
const uint TagToTokenTypeByteVector
Definition
HasDeclSecurityTag.cs:21
System.Reflection.Metadata.Ecma335.HasDeclSecurityTag.TypeDef
const uint TypeDef
Definition
HasDeclSecurityTag.cs:11
System.Reflection.Metadata.Ecma335.HasDeclSecurityTag.LargeRowSize
const int LargeRowSize
Definition
HasDeclSecurityTag.cs:9
System.Reflection.Metadata.Ecma335.HasDeclSecurityTag.TagMask
const uint TagMask
Definition
HasDeclSecurityTag.cs:17
System.Reflection.Metadata.Ecma335.HasDeclSecurityTag.TablesReferenced
const TableMask TablesReferenced
Definition
HasDeclSecurityTag.cs:19
System.Reflection.Metadata.Ecma335.HasDeclSecurityTag.ConvertToTag
static uint ConvertToTag(EntityHandle handle)
Definition
HasDeclSecurityTag.cs:35
System.Reflection.Metadata.Ecma335.HasDeclSecurityTag.MethodDef
const uint MethodDef
Definition
HasDeclSecurityTag.cs:13
System.Reflection.Metadata.Ecma335.HasDeclSecurityTag.ConvertToHandle
static EntityHandle ConvertToHandle(uint hasDeclSecurity)
Definition
HasDeclSecurityTag.cs:24
System.Reflection.Metadata.Ecma335.HasDeclSecurityTag.NumberOfBits
const int NumberOfBits
Definition
HasDeclSecurityTag.cs:7
System.Reflection.Metadata.Ecma335.HasDeclSecurityTag
Definition
HasDeclSecurityTag.cs:6
System.Reflection.Throw.InvalidCodedIndex
static void InvalidCodedIndex()
Definition
Throw.cs:201
System.Reflection.Throw
Definition
Throw.cs:9
System.Reflection.Metadata.Ecma335.TableIndex.MethodImpl
@ MethodImpl
System.Reflection.Metadata.Ecma335.TableMask
TableMask
Definition
TableMask.cs:5
System.Reflection.Metadata.Ecma335
Definition
ArrayShapeEncoder.cs:3
System.Runtime.CompilerServices.MethodImplOptions
MethodImplOptions
Definition
MethodImplOptions.cs:5
System.Runtime.CompilerServices
Definition
NullablePublicOnlyAttribute.cs:3
System.ExceptionArgument.type
@ type
System.ExceptionArgument.handle
@ handle
System.Reflection.Metadata.EntityHandle
Definition
EntityHandle.cs:6
source
System.Reflection.Metadata
System.Reflection.Metadata.Ecma335
HasDeclSecurityTag.cs
Generated by
1.10.0