-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConvertToJsonContext.cs
More file actions
30 lines (24 loc) · 938 Bytes
/
Copy pathConvertToJsonContext.cs
File metadata and controls
30 lines (24 loc) · 938 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
using System;
using Newtonsoft.Json;
namespace PowerShellRuntimeExtensions
{
public readonly struct ConvertToJsonContext
{
public ConvertToJsonContext(int maxDepth, bool enumsAsStrings, bool compressOutput)
{
this = new ConvertToJsonContext(maxDepth, enumsAsStrings, compressOutput, StringEscapeHandling.Default);
}
public ConvertToJsonContext(int maxDepth, bool enumsAsStrings, bool compressOutput,
StringEscapeHandling stringEscapeHandling)
{
this.MaxDepth = maxDepth;
this.StringEscapeHandling = stringEscapeHandling;
this.EnumsAsStrings = enumsAsStrings;
this.CompressOutput = compressOutput;
}
public readonly int MaxDepth;
public readonly StringEscapeHandling StringEscapeHandling;
public readonly bool EnumsAsStrings;
public readonly bool CompressOutput;
}
}