forked from ClearFoundry/ClearScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathV8CpuProfileFlags.cs
More file actions
30 lines (26 loc) · 884 Bytes
/
Copy pathV8CpuProfileFlags.cs
File metadata and controls
30 lines (26 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using System;
namespace Microsoft.ClearScript.V8
{
/// <summary>
/// Defines options for creating a V8 CPU profile.
/// </summary>
[Flags]
public enum V8CpuProfileFlags
{
/// <summary>
/// Specifies that no options are selected.
/// </summary>
None = 0,
/// <summary>
/// Specifies that automatic sample collection is to be enabled.
/// </summary>
EnableSampleCollection = 0x00000001
}
internal static class V8CpuProfileFlagsHelpers
{
public static bool HasAllFlags(this V8CpuProfileFlags value, V8CpuProfileFlags flags) => (value & flags) == flags;
public static bool HasAnyFlag(this V8CpuProfileFlags value, V8CpuProfileFlags flags) => (value & flags) != 0;
}
}