1
2
3
4
5
6 using System;
7
8 namespace System.Xml.Serialization
9 {
10 public enum XmlSerializationFlags : int
11 {
12 none = 0, suppressMetadata = 1 << 0
13 }
14
15 public class XmlSerializationContext
16 {
17 public nothrow XmlSerializationContext() : flags(XmlSerializationFlags.none)
18 {
19 }
20 public inline nothrow bool GetFlag(XmlSerializationFlags flag) const
21 {
22 return (flags & flag) != XmlSerializationFlags.none;
23 }
24 public nothrow void SetFlag(XmlSerializationFlags flag)
25 {
26 flags = cast<XmlSerializationFlags>(flags | flag);
27 }
28 public nothrow void ResetFlag(XmlSerializationFlags flag)
29 {
30 flags = cast<XmlSerializationFlags>(flags & ~flag);
31 }
32 private XmlSerializationFlags flags;
33 }
34 }