File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
src/Components/Components/src Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ internal static class PlatformInfo
11
11
12
12
static PlatformInfo ( )
13
13
{
14
- IsWebAssembly = RuntimeInformation . IsOSPlatform ( OSPlatform . Create ( "WEBASSEMBLY" ) ) ;
14
+ IsWebAssembly = RuntimeInformation . IsOSPlatform ( OSPlatform . Browser ) ;
15
15
}
16
16
}
17
17
}
Original file line number Diff line number Diff line change @@ -13,14 +13,9 @@ internal abstract class ComponentsProfiling
13
13
// is so that if we later have two different implementations (one for WebAssembly, one for
14
14
// Server), the execution characteristics of calling Start/End will be unchanged and historical
15
15
// perf data will still be comparable to newer data.
16
- public static readonly ComponentsProfiling Instance ;
17
-
18
- static ComponentsProfiling ( )
19
- {
20
- Instance = RuntimeInformation . IsOSPlatform ( OSPlatform . Create ( "BROWSER" ) )
21
- ? new WebAssemblyComponentsProfiling ( )
22
- : ( ComponentsProfiling ) new NoOpComponentsProfiling ( ) ;
23
- }
16
+ public static readonly ComponentsProfiling Instance = PlatformInfo . IsWebAssembly
17
+ ? new WebAssemblyComponentsProfiling ( )
18
+ : ( ComponentsProfiling ) new NoOpComponentsProfiling ( ) ;
24
19
25
20
public abstract void Start ( [ CallerMemberName ] string ? name = null ) ;
26
21
public abstract void End ( [ CallerMemberName ] string ? name = null ) ;
You can’t perform that action at this time.
0 commit comments