tangxu
2024-10-22 4d9fe5ed98ceb6b8fe9dc52ebfb80860ad1aee99
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
31
32
33
34
35
36
37
using System;
 
namespace DPumpHydr.WinFrmUI.WenSkin.Json
{
    /// <summary>
    /// Specifies type name handling options for the <see cref="T:Newtonsoft.Json.JsonSerializer" />.
    /// </summary>
    /// <remarks>
    /// <see cref="T:Newtonsoft.Json.TypeNameHandling" /> should be used with caution when your application deserializes JSON from an external source.
    /// Incoming types should be validated with a custom <see cref="T:System.Runtime.Serialization.SerializationBinder" />
    /// when deserializing with a value other than <c>TypeNameHandling.None</c>.
    /// </remarks>
    [Flags]
    public enum TypeNameHandling
    {
        /// <summary>
        /// Do not include the .NET type name when serializing types.
        /// </summary>
        None = 0x0,
        /// <summary>
        /// Include the .NET type name when serializing into a JSON object structure.
        /// </summary>
        Objects = 0x1,
        /// <summary>
        /// Include the .NET type name when serializing into a JSON array structure.
        /// </summary>
        Arrays = 0x2,
        /// <summary>
        /// Always include the .NET type name when serializing.
        /// </summary>
        All = 0x3,
        /// <summary>
        /// Include the .NET type name when the type of the object being serialized is not the same as its declared type.
        /// </summary>
        Auto = 0x4
    }
}