<Compile Include="System\Reflection\TypeLoading\Types\RoWrappedType.cs" />
</ItemGroup>
<ItemGroup>
- <Reference Include="System.Runtime" />
- <Reference Include="System.Runtime.CompilerServices.Unsafe" />
- <Reference Include="System.Runtime.Extensions" />
- <Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Collections" />
<Reference Include="System.Collections.Concurrent" />
<Reference Include="System.Collections.Immutable" />
<Reference Include="System.Memory" />
<Reference Include="System.Reflection.Metadata" />
<Reference Include="System.Resources.ResourceManager" />
+ <Reference Include="System.Runtime" />
+ <Reference Include="System.Runtime.Extensions" />
+ <Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Threading" />
</ItemGroup>
</Project>
using System.Diagnostics;
using System.Reflection.Runtime.BindingFlagSupport;
using System.Threading;
-using Unsafe = System.Runtime.CompilerServices.Unsafe;
using RuntimeTypeInfo = System.Reflection.TypeLoading.RoType;
namespace System.Reflection.TypeLoading
(immediateTypeOnly ? _perNameQueryCaches_CaseSensitive_ImmediateTypeOnly : _perNameQueryCaches_CaseSensitive);
object unifierAsObject = cacheArray[index];
- Debug.Assert(unifierAsObject is PerNameQueryCache<M>);
- PerNameQueryCache<M> unifier = Unsafe.As<PerNameQueryCache<M>>(unifierAsObject);
+ PerNameQueryCache<M> unifier = (PerNameQueryCache<M>)unifierAsObject;
QueriedMemberList<M> result = unifier.GetOrAdd(name);
return result;
}
Volatile.Write(ref _nameAgnosticQueryCaches[index], newResult);
return newResult;
}
- Debug.Assert(result is QueriedMemberList<M>);
- QueriedMemberList<M> list = Unsafe.As<QueriedMemberList<M>>(result);
+ QueriedMemberList<M> list = (QueriedMemberList<M>)result;
if (list.ImmediateTypeOnly && !immediateTypeOnly)
{
QueriedMemberList<M> newResult = QueriedMemberList<M>.Create(_type, filter: null, ignoreCase: false, immediateTypeOnly: false);