File tree 4 files changed +14
-4
lines changed
4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 27
27
<AllowUnsafeBlocks >True</AllowUnsafeBlocks >
28
28
</PropertyGroup >
29
29
30
- <ItemGroup >
31
- <Compile Include =" ..\Ultra.Sampler\UltraSamplerConstants.cs" Link =" UltraSamplerConstants.cs" />
32
- </ItemGroup >
33
-
34
30
<ItemGroup >
35
31
<None Include =" $(MSBuildThisFileDirectory)../../img/ultra.png" Pack =" true" PackagePath =" /" />
36
32
<None Include =" readme.md" Pack =" true" PackagePath =" /" />
55
51
<CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
56
52
</Content >
57
53
</ItemGroup >
54
+
55
+ <ItemGroup >
56
+ <ProjectReference Include =" ..\Ultra.Sampler\Ultra.Sampler.csproj" />
57
+ </ItemGroup >
58
58
</Project >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ namespace Ultra.Sampler;
11
11
[ EventSource ( Name = UltraSamplerConstants . ProviderName ) ] // Cannot set the ProviderGuid that is not used https://github.com/dotnet/diagnostics/issues/389
12
12
internal sealed class UltraSamplerSource : EventSource
13
13
{
14
+ [ DynamicDependency ( DynamicallyAccessedMemberTypes . PublicMethods , typeof ( UltraSamplerSource ) ) ]
14
15
public static readonly UltraSamplerSource Log = new ( ) ;
15
16
16
17
private UltraSamplerSource ( )
Original file line number Diff line number Diff line change 2
2
// Licensed under the BSD-Clause 2 license.
3
3
// See license.txt file in the project root for full license information.
4
4
5
+ using Ultra . Core ;
5
6
using Ultra . Sampler ;
6
7
using Ultra . Sampler . MacOS ;
7
8
@@ -23,4 +24,12 @@ public void TestNativeModules()
23
24
Console . WriteLine ( $ "{ nativeModule } ") ;
24
25
}
25
26
}
27
+
28
+ [ TestMethod ]
29
+ public void TestEventSource ( )
30
+ {
31
+ var sampler = UltraSamplerSource . Log ;
32
+ Assert . AreEqual ( UltraSamplerConstants . ProviderName , sampler . Name ) ;
33
+ Assert . AreEqual ( UltraSamplerConstants . ProviderGuid , sampler . Guid ) ;
34
+ }
26
35
}
You can’t perform that action at this time.
0 commit comments