7 /// Enumeration for specifying the mode of the information type
9 public enum InformationTypeMode
12 /// Inclusive information type. The user will be allowed to select from one or more information types.
16 /// Exclusive information type. The user will be allowed to choose only one information type within each category
20 /// Hidden information type. The user cannot see this information types (only for API calls).
26 /// The class <c>InformationType</c> implements a methods/properties for an information type.
28 /// <remarks>Note: Information types and categories allow users to filter help contents.
29 /// They are only supported if using sitemap TOC and/or sitemap Index.</remarks>
30 public class InformationType
32 private string _name = "";
33 private string _description = "";
34 private InformationTypeMode _typeMode = InformationTypeMode.Inclusive;
35 private bool _isInCategory = false;
36 private int _referenceCount = 1;
39 /// Standard constructor
41 /// <remarks>the mode is set to InformationTypeMode.Inclusive by default</remarks>
42 public InformationType() : this("","")
47 /// Standard constructor
49 /// <param name="name">name of the information type</param>
50 /// <param name="description">description</param>
51 /// <remarks>the mode is set to InformationTypeMode.Inclusive by default</remarks>
52 public InformationType(string name, string description) : this(name, description, InformationTypeMode.Inclusive)
57 /// Standard constructor
59 /// <param name="name">name of the information type</param>
60 /// <param name="description">description</param>
61 /// <param name="mode">mode of the information type</param>
62 public InformationType(string name, string description, InformationTypeMode mode)
65 _description = description;
71 /// Dump the class data to a binary writer
73 /// <param name="writer">writer to write the data</param>
74 internal void Dump(ref BinaryWriter writer)
76 writer.Write( (int)_typeMode );
77 writer.Write( _name );
78 writer.Write( _description );
82 /// Reads the object data from a dump store
84 /// <param name="reader">reader to read the data</param>
85 internal void ReadDump(ref BinaryReader reader)
87 _typeMode = (InformationTypeMode)reader.ReadInt32();
88 _name = reader.ReadString();
89 _description = reader.ReadString();
94 /// Sets the flag if this information type is nested in at least one category
96 /// <param name="newValue">true or false</param>
97 internal void SetCategoryFlag(bool newValue)
99 _isInCategory = newValue;
103 /// Gets/Sets the reference count of this information type instance
105 internal int ReferenceCount
107 get { return _referenceCount; }
108 set { _referenceCount = value; }
112 /// Gets true if this information type is nested in at least one category
114 public bool IsInCategory
116 get { return _isInCategory; }
120 /// Gets/Sets the name of the information type
124 get { return _name; }
125 set { _name = value; }
129 /// Gets/Sets the description of the information type
131 public string Description
133 get { return _description; }
134 set { _name = value; }
138 /// Gets/Sets the mode of the information type
140 public InformationTypeMode Mode
142 get { return _typeMode; }
143 set { _typeMode = value; }