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