Skip to content

Commit 11ee9bf

Browse files
committed
Fix ContinuousProfiling apps
1 parent c62594f commit 11ee9bf

File tree

1 file changed

+4
-2
lines changed
  • test/test-applications/integrations/TestApplication.ContinuousProfiler

1 file changed

+4
-2
lines changed

test/test-applications/integrations/TestApplication.ContinuousProfiler/ClassA.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace My.Custom.Test.Namespace;
99

10-
internal static class ClassA
10+
internal static partial class ClassA
1111
{
1212
private static readonly Callback TestCallback = GenericClassC<int>.GenericMethodCFromGenericClass;
1313

@@ -111,13 +111,15 @@ public static void MethodAOthers<T>(
111111
static void Action(int s) => InternalClassB<string, int>.DoubleInternalClassB.TripleInternalClassB<int>.MethodB(s, [3], TimeSpan.Zero, 0, ["a"], []);
112112
}
113113

114-
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
114+
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
115115
#if NET
116116
[DllImport("TestApplication.ContinuousProfiler.NativeDep")]
117117
#else
118118
[DllImport("TestApplication.ContinuousProfiler.NativeDep.dll")]
119119
#endif
120+
#pragma warning disable CA5393 // Do not use unsafe DllImportSearchPath value. Needed to execute on macOS or Linux.
120121
private static extern int OTelAutoCallbackTest(Callback fp, int n);
122+
#pragma warning restore CA5393 // Do not use unsafe DllImportSearchPath value. Needed to execute on macOS or Linux.
121123

122124
internal static class InternalClassB<T1, T4>
123125
{

0 commit comments

Comments
 (0)