2 instantiations of UserStringHandle
System.Reflection.Metadata (2)
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (2)
2155
return new
UserStringHandle
(heapOffset);
2170
return new
UserStringHandle
(handle.Offset);
52 references to UserStringHandle
Microsoft.CodeAnalysis (13)
PEWriter\MetadataWriter.cs (13)
425
private
UserStringHandle
[] _pseudoStringTokenToTokenMap;
493
_pseudoStringTokenToTokenMap = new
UserStringHandle
[_pseudoStringTokenToStringMap.Length];
2947
var
mvidStringHandle = default(
UserStringHandle
);
2996
private int SerializeMethodBody(MethodBodyStreamEncoder encoder, IMethodBody methodBody, StandaloneSignatureHandle localSignatureHandleOpt, ref
UserStringHandle
mvidStringHandle, ref Blob mvidStringFixup)
3144
private
UserStringHandle
ResolveUserStringHandleFromPseudoToken(int pseudoStringToken)
3150
var
handle = GetOrAddUserString(str);
3159
private
UserStringHandle
GetOrAddUserString(string str)
3174
return default(
UserStringHandle
);
3177
private ReservedBlob<
UserStringHandle
> ReserveUserString(int length)
3192
return default(ReservedBlob<
UserStringHandle
>);
3234
private void WriteInstructions(Blob finalIL, ImmutableArray<byte> generatedIL, ref
UserStringHandle
mvidStringHandle, ref Blob mvidStringFixup)
3309
UserStringHandle
handle;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTests.cs (1)
331
var
us = MetadataTokens.UserStringHandle(0);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1988
return "\"" + reader.GetUserString((
UserStringHandle
)MetadataTokens.Handle((int)token)) + "\"";
System.Reflection.Metadata (36)
System\Reflection\Metadata\Ecma335\Encoding\InstructionEncoder.cs (1)
91
public void LoadString(
UserStringHandle
handle)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (12)
35
private readonly Dictionary<string,
UserStringHandle
> _userStrings = new Dictionary<string,
UserStringHandle
>(256);
179
internal static int SerializeHandle(
UserStringHandle
handle) => handle.GetHeapOffset();
469
/// Handle may be used in <see cref="InstructionEncoder.LoadString(
UserStringHandle
)"/>.
474
public ReservedBlob<
UserStringHandle
> ReserveUserString(int length)
481
var
handle = GetNewUserStringHandle();
484
return new ReservedBlob<
UserStringHandle
>(handle, reservedUserString);
493
/// May be used in <see cref="InstructionEncoder.LoadString(
UserStringHandle
)"/>.
497
public
UserStringHandle
GetOrAddUserString(string value)
504
UserStringHandle
handle;
516
private
UserStringHandle
GetNewUserStringHandle()
527
return
UserStringHandle
.FromOffset(offset);
System\Reflection\Metadata\Ecma335\MetadataReaderExtensions.cs (2)
243
public static
UserStringHandle
GetNextHandle(this MetadataReader reader,
UserStringHandle
handle)
System\Reflection\Metadata\Ecma335\MetadataTokens.cs (3)
177
public static int GetHeapOffset(
UserStringHandle
handle) => handle.GetHeapOffset();
499
public static
UserStringHandle
UserStringHandle(int offset)
501
return Metadata.
UserStringHandle
.FromOffset(offset & (int)TokenTypeIds.RIDMask);
System\Reflection\Metadata\Internal\UserStringHeap.cs (6)
17
internal string GetString(
UserStringHandle
handle)
30
internal
UserStringHandle
GetNextHandle(
UserStringHandle
handle)
35
return default(
UserStringHandle
);
41
return default(
UserStringHandle
);
44
return
UserStringHandle
.FromOffset(nextIndex);
System\Reflection\Metadata\MetadataReader.cs (1)
1098
public string GetUserString(
UserStringHandle
handle)
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (11)
2138
public readonly struct UserStringHandle : IEquatable<
UserStringHandle
>
2153
internal static
UserStringHandle
FromOffset(int heapOffset)
2158
public static implicit operator Handle(
UserStringHandle
handle)
2163
public static explicit operator
UserStringHandle
(Handle handle)
2183
public static bool operator ==(
UserStringHandle
left,
UserStringHandle
right)
2190
return obj is
UserStringHandle
&& ((
UserStringHandle
)obj)._offset == _offset;
2193
public bool Equals(
UserStringHandle
other)
2203
public static bool operator !=(
UserStringHandle
left,
UserStringHandle
right)
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\General\Ecma\MetadataExtensions.cs (1)
57
public static string GetUserString(this
UserStringHandle
handle, MetadataReader reader) => reader.GetUserString(handle);