未验证 提交 79e5a369 编写于 作者: T Tomáš Matoušek 提交者: GitHub

Select specific overload in DebugDirectoryExtensions reflection (#25284)

上级 348febe6
......@@ -15,6 +15,7 @@
using Microsoft.CodeAnalysis.CSharp.Test.Utilities;
using Microsoft.CodeAnalysis.Emit;
using Microsoft.CodeAnalysis.Test.Utilities;
using Roslyn.Reflection.PortableExecutable;
using Roslyn.Test.Utilities;
using Roslyn.Utilities;
using Xunit;
......
......@@ -13,6 +13,7 @@
using Microsoft.CodeAnalysis.Debugging;
using Microsoft.CodeAnalysis.Emit;
using Microsoft.CodeAnalysis.Test.Utilities;
using Roslyn.Reflection.PortableExecutable;
using Roslyn.Test.Utilities;
using Xunit;
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Immutable;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Reflection.Metadata;
using System.Reflection.PortableExecutable;
using Roslyn.Utilities;
namespace System.Reflection.PortableExecutable
namespace Roslyn.Reflection.PortableExecutable
{
// TODO: move to SRM: https://github.com/dotnet/roslyn/issues/24712
internal static class DebugDirectoryExtensions
......@@ -21,7 +25,9 @@ private static void InitializeReflection()
{
var type = typeof(DebugDirectoryBuilder).GetTypeInfo();
s_dataBuilderField = type.GetDeclaredField("_dataBuilder");
s_addEntry = (Action<DebugDirectoryBuilder, DebugDirectoryEntryType, uint, uint, int>)type.GetDeclaredMethod("AddEntry").CreateDelegate(typeof(Action<DebugDirectoryBuilder, DebugDirectoryEntryType, uint, uint, int>));
s_addEntry = (Action<DebugDirectoryBuilder, DebugDirectoryEntryType, uint, uint, int>)
type.GetDeclaredMethod("AddEntry", typeof(DebugDirectoryEntryType), typeof(uint), typeof(uint), typeof(int)).
CreateDelegate(typeof(Action<DebugDirectoryBuilder, DebugDirectoryEntryType, uint, uint, int>));
}
}
......
......@@ -15,6 +15,7 @@
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Emit;
using Roslyn.Reflection.PortableExecutable;
using static Microsoft.CodeAnalysis.SigningUtilities;
using EmitContext = Microsoft.CodeAnalysis.Emit.EmitContext;
......
......@@ -8,6 +8,7 @@ Imports System.Text
Imports Microsoft.CodeAnalysis.Debugging
Imports Microsoft.CodeAnalysis.Emit
Imports Microsoft.CodeAnalysis.Test.Utilities
Imports Roslyn.Reflection.PortableExecutable
Imports Roslyn.Test.Utilities
Namespace Microsoft.CodeAnalysis.VisualBasic.UnitTests.PDB
......
......@@ -20,6 +20,7 @@
using Microsoft.DiaSymReader;
using Microsoft.DiaSymReader.Tools;
using Microsoft.Metadata.Tools;
using Roslyn.Reflection.PortableExecutable;
using Roslyn.Test.PdbUtilities;
using Roslyn.Test.Utilities;
using Roslyn.Utilities;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册