39 instantiations of Handle
System.Reflection.Metadata (39)
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (2)
293
return new
Handle
((byte)handle.Type, relativeHeapOffset);
330
return new
Handle
((byte)handle.Type, relativeRowId);
System\Reflection\Metadata\Handle.cs (1)
30
return new
Handle
((byte)(vToken >> TokenTypeIds.RowIdBitCount), (int)(vToken & TokenTypeIds.RIDMask));
System\Reflection\Metadata\PortablePdb\Handles.Debug.cs (7)
29
return new
Handle
(tokenTypeSmall, handle._rowId);
112
return new
Handle
(tokenTypeSmall, handle._rowId);
207
return new
Handle
(tokenTypeSmall, handle._rowId);
290
return new
Handle
(tokenTypeSmall, handle._rowId);
373
return new
Handle
(tokenTypeSmall, handle._rowId);
456
return new
Handle
(tokenTypeSmall, handle._rowId);
539
return new
Handle
(tokenTypeSmall, handle._rowId);
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (29)
29
return new
Handle
(tokenTypeSmall, handle._rowId);
112
return new
Handle
(tokenTypeSmall, handle._rowId);
195
return new
Handle
(tokenTypeSmall, handle._rowId);
278
return new
Handle
(tokenTypeSmall, handle._rowId);
373
return new
Handle
(tokenTypeSmall, handle._rowId);
456
return new
Handle
(tokenTypeSmall, handle._rowId);
539
return new
Handle
(tokenTypeSmall, handle._rowId);
622
return new
Handle
(tokenTypeSmall, handle._rowId);
705
return new
Handle
(tokenTypeSmall, handle._rowId);
788
return new
Handle
(tokenTypeSmall, handle._rowId);
871
return new
Handle
(tokenTypeSmall, handle._rowId);
954
return new
Handle
(tokenTypeSmall, handle._rowId);
1037
return new
Handle
(tokenTypeSmall, handle._rowId);
1120
return new
Handle
(tokenTypeSmall, handle._rowId);
1203
return new
Handle
(tokenTypeSmall, handle._rowId);
1286
return new
Handle
(tokenTypeSmall, handle._rowId);
1369
return new
Handle
(tokenTypeSmall, handle._rowId);
1452
return new
Handle
(tokenTypeSmall, handle._rowId);
1535
return new
Handle
(tokenTypeSmall, handle._rowId);
1736
return new
Handle
(tokenTypeSmall, handle._rowId);
1819
return new
Handle
(tokenTypeSmall, handle._rowId);
1902
return new
Handle
(tokenTypeSmall, handle._rowId);
1985
return new
Handle
(tokenTypeSmall, handle._rowId);
2068
return new
Handle
(tokenTypeSmall, handle._rowId);
2160
return new
Handle
((byte)HandleType.UserString, handle._offset);
2345
return new
Handle
(
2475
return new
Handle
(
2607
return new
Handle
(
2698
return new
Handle
((byte)HandleType.Guid, handle._index);
151 references to Handle
BuildValidator (1)
Util.cs (1)
47
foreach (var attributeHandle in reader.GetCustomAttributes(
Handle
.AssemblyDefinition))
Microsoft.CodeAnalysis (1)
PEWriter\MetadataWriter.cs (1)
2052
EntityHandle parentHandle =
Handle
.AssemblyDefinition;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
Emit\EditAndContinue\EditAndContinueTests.cs (4)
897
Handle
(7, TableIndex.MethodDef),
898
Handle
(4, TableIndex.CustomAttribute),
903
new CustomAttributeRow(
Handle
(7, TableIndex.MethodDef),
Handle
(2, TableIndex.MethodDef))
Microsoft.CodeAnalysis.Test.Utilities (3)
Metadata\AggregatedMetadataReader.cs (3)
34
private TEntity GetValue<TEntity>(
Handle
handle, Func<MetadataReader,
Handle
, TEntity> getter)
36
var
genHandle = _aggregator.GetGenerationHandle(handle, out var generation);
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (17)
Emit\EditAndContinue\EditAndContinuePdbTests.vb (15)
179
Handle
(11, TableIndex.MethodDebugInformation),
180
Handle
(13, TableIndex.MethodDebugInformation),
181
Handle
(16, TableIndex.MethodDebugInformation),
182
Handle
(17, TableIndex.MethodDebugInformation),
183
Handle
(18, TableIndex.MethodDebugInformation),
184
Handle
(19, TableIndex.MethodDebugInformation))
288
Handle
(10, TableIndex.MethodDebugInformation),
289
Handle
(11, TableIndex.MethodDebugInformation),
290
Handle
(13, TableIndex.MethodDebugInformation),
291
Handle
(16, TableIndex.MethodDebugInformation),
292
Handle
(17, TableIndex.MethodDebugInformation),
293
Handle
(18, TableIndex.MethodDebugInformation),
294
Handle
(19, TableIndex.MethodDebugInformation),
295
Handle
(20, TableIndex.MethodDebugInformation),
296
Handle
(21, TableIndex.MethodDebugInformation))
Emit\EditAndContinue\EditAndContinueTestBase.vb (2)
270
getName As Func(Of MetadataReader,
Handle
, StringHandle),
271
toHandle As Func(Of THandle,
Handle
),
Roslyn.Test.PdbUtilities (3)
EditAndContinue\EditAndContinueTestUtilities.cs (3)
104
Func<MetadataReader,
Handle
, StringHandle> getName,
105
Func<THandle,
Handle
> toHandle,
112
var
genEntityHandle = aggregator.GetGenerationHandle(toHandle(handle), out int typeGeneration);
System.Diagnostics.StackTrace (1)
System\Diagnostics\StackTraceSymbols.cs (1)
61
Handle
handle = MetadataTokens.Handle(methodToken);
System.Reflection.Metadata (118)
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (2)
247
public
Handle
GetGenerationHandle(
Handle
handle, out int generation)
System\Reflection\Metadata\Ecma335\MetadataTokens.cs (11)
41
public static int GetHeapOffset(this MetadataReader reader,
Handle
handle)
80
public static int GetToken(this MetadataReader reader,
Handle
handle)
95
private static int MapVirtualHandleRowId(MetadataReader reader,
Handle
handle)
134
/// See <see cref="GetHeapOffset(MetadataReader,
Handle
)"/>.
136
public static int GetHeapOffset(
Handle
handle)
157
/// See <see cref="GetHeapOffset(MetadataReader,
Handle
)"/>.
185
/// See <see cref="GetHeapOffset(MetadataReader,
Handle
)"/>.
194
/// See <see cref="GetToken(MetadataReader,
Handle
)"/>.
200
public static int GetToken(
Handle
handle)
289
public static
Handle
Handle(int token)
296
return Metadata.
Handle
.FromVToken((uint)token);
System\Reflection\Metadata\EntityHandle.cs (4)
15
/// It has smaller memory footprint than <see cref="
Handle
"/>.
30
public static implicit operator
Handle
(EntityHandle handle)
32
return
Handle
.FromVToken(handle._vToken);
35
public static explicit operator EntityHandle(
Handle
handle)
System\Reflection\Metadata\Handle.cs (12)
14
/// Use <see cref="
Handle
"/> to store multiple kinds of handles.
16
public readonly struct Handle : IEquatable<
Handle
>
26
/// Creates <see cref="
Handle
"/> from a token or a token combined with a virtual flag.
28
internal static
Handle
FromVToken(uint vToken)
165
return obj is
Handle
handle && Equals(handle);
168
public bool Equals(
Handle
other)
178
public static bool operator ==(
Handle
left,
Handle
right)
183
public static bool operator !=(
Handle
left,
Handle
right)
188
internal static int Compare(
Handle
left,
Handle
right)
System\Reflection\Metadata\HandleComparer.cs (10)
8
public sealed class HandleComparer : IEqualityComparer<
Handle
>, IComparer<
Handle
>, IEqualityComparer<EntityHandle>, IComparer<EntityHandle>
21
public bool Equals(
Handle
x,
Handle
y)
31
public int GetHashCode(
Handle
obj)
46
/// Returns 0 if and only if <see cref="Equals(
Handle
,
Handle
)"/> returns true.
48
public int Compare(
Handle
x,
Handle
y)
50
return
Handle
.Compare(x, y);
System\Reflection\Metadata\Internal\MetadataFlags.cs (1)
199
/// These constants are all in the byte range and apply to the interpretation of <see cref="
Handle
.VType"/>,
System\Reflection\Metadata\PortablePdb\Handles.Debug.cs (14)
27
public static implicit operator
Handle
(DocumentHandle handle)
37
public static explicit operator DocumentHandle(
Handle
handle)
110
public static implicit operator
Handle
(MethodDebugInformationHandle handle)
120
public static explicit operator MethodDebugInformationHandle(
Handle
handle)
205
public static implicit operator
Handle
(LocalScopeHandle handle)
215
public static explicit operator LocalScopeHandle(
Handle
handle)
288
public static implicit operator
Handle
(LocalVariableHandle handle)
298
public static explicit operator LocalVariableHandle(
Handle
handle)
371
public static implicit operator
Handle
(LocalConstantHandle handle)
381
public static explicit operator LocalConstantHandle(
Handle
handle)
454
public static implicit operator
Handle
(ImportScopeHandle handle)
464
public static explicit operator ImportScopeHandle(
Handle
handle)
537
public static implicit operator
Handle
(CustomDebugInformationHandle handle)
547
public static explicit operator CustomDebugInformationHandle(
Handle
handle)
System\Reflection\Metadata\PortablePdb\ImportDefinition.cs (3)
16
private readonly
Handle
_typeOrNamespace;
22
Handle
typeOrNamespace = default(
Handle
))
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (61)
27
public static implicit operator
Handle
(ModuleDefinitionHandle handle)
37
public static explicit operator ModuleDefinitionHandle(
Handle
handle)
110
public static implicit operator
Handle
(AssemblyDefinitionHandle handle)
120
public static explicit operator AssemblyDefinitionHandle(
Handle
handle)
193
public static implicit operator
Handle
(InterfaceImplementationHandle handle)
203
public static explicit operator InterfaceImplementationHandle(
Handle
handle)
276
public static implicit operator
Handle
(MethodDefinitionHandle handle)
286
public static explicit operator MethodDefinitionHandle(
Handle
handle)
371
public static implicit operator
Handle
(MethodImplementationHandle handle)
381
public static explicit operator MethodImplementationHandle(
Handle
handle)
454
public static implicit operator
Handle
(MethodSpecificationHandle handle)
464
public static explicit operator MethodSpecificationHandle(
Handle
handle)
537
public static implicit operator
Handle
(TypeDefinitionHandle handle)
547
public static explicit operator TypeDefinitionHandle(
Handle
handle)
620
public static implicit operator
Handle
(ExportedTypeHandle handle)
630
public static explicit operator ExportedTypeHandle(
Handle
handle)
703
public static implicit operator
Handle
(TypeReferenceHandle handle)
713
public static explicit operator TypeReferenceHandle(
Handle
handle)
786
public static implicit operator
Handle
(TypeSpecificationHandle handle)
796
public static explicit operator TypeSpecificationHandle(
Handle
handle)
869
public static implicit operator
Handle
(MemberReferenceHandle handle)
879
public static explicit operator MemberReferenceHandle(
Handle
handle)
952
public static implicit operator
Handle
(FieldDefinitionHandle handle)
962
public static explicit operator FieldDefinitionHandle(
Handle
handle)
1035
public static implicit operator
Handle
(EventDefinitionHandle handle)
1045
public static explicit operator EventDefinitionHandle(
Handle
handle)
1118
public static implicit operator
Handle
(PropertyDefinitionHandle handle)
1128
public static explicit operator PropertyDefinitionHandle(
Handle
handle)
1201
public static implicit operator
Handle
(StandaloneSignatureHandle handle)
1211
public static explicit operator StandaloneSignatureHandle(
Handle
handle)
1284
public static implicit operator
Handle
(ParameterHandle handle)
1294
public static explicit operator ParameterHandle(
Handle
handle)
1367
public static implicit operator
Handle
(GenericParameterHandle handle)
1377
public static explicit operator GenericParameterHandle(
Handle
handle)
1450
public static implicit operator
Handle
(GenericParameterConstraintHandle handle)
1460
public static explicit operator GenericParameterConstraintHandle(
Handle
handle)
1533
public static implicit operator
Handle
(ModuleReferenceHandle handle)
1543
public static explicit operator ModuleReferenceHandle(
Handle
handle)
1639
public static implicit operator
Handle
(AssemblyReferenceHandle handle)
1641
return
Handle
.FromVToken(handle.VToken);
1649
public static explicit operator AssemblyReferenceHandle(
Handle
handle)
1734
public static implicit operator
Handle
(CustomAttributeHandle handle)
1744
public static explicit operator CustomAttributeHandle(
Handle
handle)
1817
public static implicit operator
Handle
(DeclarativeSecurityAttributeHandle handle)
1827
public static explicit operator DeclarativeSecurityAttributeHandle(
Handle
handle)
1900
public static implicit operator
Handle
(ConstantHandle handle)
1910
public static explicit operator ConstantHandle(
Handle
handle)
1983
public static implicit operator
Handle
(ManifestResourceHandle handle)
1993
public static explicit operator ManifestResourceHandle(
Handle
handle)
2066
public static implicit operator
Handle
(AssemblyFileHandle handle)
2076
public static explicit operator AssemblyFileHandle(
Handle
handle)
2158
public static implicit operator
Handle
(UserStringHandle handle)
2163
public static explicit operator UserStringHandle(
Handle
handle)
2342
public static implicit operator
Handle
(StringHandle handle)
2350
public static explicit operator StringHandle(
Handle
handle)
2473
public static implicit operator
Handle
(NamespaceDefinitionHandle handle)
2480
public static explicit operator NamespaceDefinitionHandle(
Handle
handle)
2604
public static implicit operator
Handle
(BlobHandle handle)
2612
public static explicit operator BlobHandle(
Handle
handle)
2696
public static implicit operator
Handle
(GuidHandle handle)
2701
public static explicit operator GuidHandle(
Handle
handle)
System.Reflection.MetadataLoadContext (3)
System\Reflection\TypeLoading\General\Ecma\MetadataExtensions.cs (2)
59
public static int GetToken(this
Handle
handle) => MetadataTokens.GetToken(handle);
91
public static
Handle
ToHandle(this int token) => MetadataTokens.Handle(token);
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.cs (1)
58
Handle
handle = entryPointToken.ToHandle();