annotate Implab/JSON/JSONXmlReaderOptions.cs @ 145:706fccb85524 v2

RC: cancellation support for promises + tests
author cin
date Sun, 08 Mar 2015 02:52:27 +0300
parents 4f20870d0816
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
60
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
1 using System;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
2 using System.Collections.Generic;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
3 using System.Linq;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
4 using System.Text;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
5 using System.Xml;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
6
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
7 namespace Implab.JSON {
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
8 /// <summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
9 /// Набор необязательных параметров для <see cref="JSONXmlReader"/>, позволяющий управлять процессом
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
10 /// интерпретации <c>JSON</c> документа.
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
11 /// </summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
12 public class JSONXmlReaderOptions {
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
13 /// <summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
14 /// Пространство имен в котором будут располагаться читаемые элементы документа
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
15 /// </summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
16 public string NamespaceURI {
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
17 get;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
18 set;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
19 }
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
20
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
21 /// <summary>
80
4f20870d0816 added memory barriers
cin
parents: 64
diff changeset
22 /// Интерпретировать массивы как множественные элементы (убирает один уровень вложенности), иначе массив
4f20870d0816 added memory barriers
cin
parents: 64
diff changeset
23 /// представляется в виде узла, дочерними элементами которого являются элементы массива, имена дочерних элементов
4f20870d0816 added memory barriers
cin
parents: 64
diff changeset
24 /// определяются свойством <see cref="ArrayItemName"/>. По умолчанию <c>false</c>.
60
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
25 /// </summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
26 public bool FlattenArrays {
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
27 get;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
28 set;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
29 }
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
30
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
31 /// <summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
32 /// Префикс, для узлов документа
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
33 /// </summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
34 public string NodesPrefix {
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
35 get;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
36 set;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
37 }
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
38
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
39 /// <summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
40 /// Имя корневого элемента в xml документе
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
41 /// </summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
42 public string RootName {
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
43 get;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
44 set;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
45 }
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
46
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
47 /// <summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
48 /// Имя элемента для массивов, если не включена опция <see cref="FlattenArrays"/>.
80
4f20870d0816 added memory barriers
cin
parents: 64
diff changeset
49 /// По умолчанию <c>item</c>.
60
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
50 /// </summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
51 public string ArrayItemName {
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
52 get;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
53 set;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
54 }
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
55
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
56 /// <summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
57 /// Таблица атомизированных строк для построения документа.
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
58 /// </summary>
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
59 public XmlNameTable NameTable {
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
60 get;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
61 set;
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
62 }
63
908b4f340c69 fixed: JSONXmlReader.Value returns invalid textual representation for numbers.
cin
parents: 60
diff changeset
63
60
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
64 }
10c7337d29e7 +JSONXmlReaderOptions
cin
parents:
diff changeset
65 }