/// <summary> /// Adds the specified <see cref="SimpleData"/> to this instance. /// </summary> /// <param name="data">The <c>SimpleData</c> to add to this instance.</param> /// <exception cref="ArgumentNullException">data is null.</exception> /// <exception cref="InvalidOperationException"> /// data belongs to another <see cref="Element"/>. /// </exception> public void AddData(SimpleData data) { this.AddChild(data); }
private void GatherSimpleDataFields(SimpleData data, string prefix) { if (data.Name != null) { _map[prefix + data.Name] = data.Text; string name; if (!_fieldMap.TryGetValue(data.Name, out name)) { name = data.Name; // Fallback to it's name } _markup.Add(Tuple.Create(name, data.Text)); } }
/// <summary> /// Adds the specified <see cref="SimpleData"/> to this instance. /// </summary> /// <param name="data">The <c>SimpleData</c> to add to this instance.</param> /// <exception cref="ArgumentNullException">data is null.</exception> /// <exception cref="InvalidOperationException"> /// data belongs to another <see cref="Element"/>. /// </exception> public void AddData(SimpleData data) { this.AddAsChild(this.dataList, data); }