3
3
using System . Runtime ;
4
4
using System . Runtime . InteropServices ;
5
5
6
- namespace VBAudioRouter . Host
6
+ namespace VBAudioRouter . Host ;
7
+
8
+ static class Program
7
9
{
8
- static class Program
10
+ [ MTAThread ]
11
+ static void Main ( string [ ] args )
9
12
{
10
- [ MTAThread ]
11
- static void Main ( string [ ] args )
13
+ GCSettings . LatencyMode = GCLatencyMode . SustainedLowLatency ;
14
+ using ( SentrySdk . Init ( o =>
15
+ {
16
+ o . Dsn = "https://[email protected] /6409713" ;
17
+ // When configuring for the first time, to see what the SDK is doing:
18
+ o . Debug = true ;
19
+ // Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring.
20
+ // We recommend adjusting this value in production.
21
+ o . TracesSampleRate = 1.0 ;
22
+ } ) )
12
23
{
13
- GCSettings . LatencyMode = GCLatencyMode . SustainedLowLatency ;
14
- using ( SentrySdk . Init ( o =>
24
+ try
15
25
{
16
- o . Dsn = "https://[email protected] /6409713" ;
17
- // When configuring for the first time, to see what the SDK is doing:
18
- o . Debug = true ;
19
- // Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring.
20
- // We recommend adjusting this value in production.
21
- o . TracesSampleRate = 1.0 ;
22
- } ) )
26
+ VBAudioRouter . Program . Win32Main ( args ) ;
27
+ }
28
+ catch ( Exception ex )
23
29
{
24
- try
25
- {
26
- VBAudioRouter . Program . Win32Main ( args ) ;
27
- }
28
- catch ( Exception ex )
29
- {
30
- MessageBox ( IntPtr . Zero , ex . Message , "Error" , MB_ICONERROR ) ;
31
- throw ;
32
- }
30
+ MessageBox ( IntPtr . Zero , ex . Message , "Error" , MB_ICONERROR ) ;
31
+ throw ;
33
32
}
34
33
}
34
+ }
35
35
36
- const int MB_OKCANCEL = 0x00000001 ;
37
- const int MB_ICONERROR = 0x00000010 ;
36
+ const int MB_OKCANCEL = 0x00000001 ;
37
+ const int MB_ICONERROR = 0x00000010 ;
38
38
39
- [ DllImport ( "user32.dll" ) ]
40
- static extern void MessageBox (
41
- IntPtr hWnd ,
42
- string text ,
43
- string caption ,
44
- uint type
45
- ) ;
46
- }
39
+ [ DllImport ( "user32.dll" ) ]
40
+ static extern void MessageBox (
41
+ IntPtr hWnd ,
42
+ string text ,
43
+ string caption ,
44
+ uint type
45
+ ) ;
47
46
}
0 commit comments