/// <summary>Adds a specified collection of <see cref="InfoOutputProperty"/> objects to the current instance with respect to <see cref="GeneralPropertyGroupName"/>. /// </summary> /// <param name="generalProperties">The general properties to add.</param> public void Add(params InfoOutputProperty[] generalProperties) { if (generalProperties != null) { foreach (var property in generalProperties) { m_GeneralProperties.Add(property.Name, property); } } }
/// <summary>Gets the <see cref="InfoOutputPackage"/> object with respect to the category <see cref="GeneralCategoryName"/>. /// </summary> /// <returns>The <see cref="InfoOutputPackage"/> object with respect to the <see cref="GeneralCategoryName"/>.</returns> /// <remarks>If no there is no general <see cref="InfoOutputPackage"/> object available it will be created, stored internally and returned.</remarks> public InfoOutputPackage GetGeneralPackage() { if (m_Values.TryGetValue(GeneralCategoryName, out InfoOutputPackage generalInfoOutputPackage) == true) { return(generalInfoOutputPackage); } generalInfoOutputPackage = new InfoOutputPackage(GeneralCategoryName); m_Values.Add(generalInfoOutputPackage.CategoryName, generalInfoOutputPackage); return(generalInfoOutputPackage); }
public void AddItem_TryGetValue_TestCase() { m_IdentifierStringDictionary.Add("TestItem", 1234); bool state = m_IdentifierStringDictionary.TryGetValue("TestItem", out object testOutput); Assert.That(state, NUnit.Framework.Is.EqualTo(true)); Assert.That(testOutput, NUnit.Framework.Is.EqualTo(1234)); }
/// <summary>Adds a specified <see cref="InfoOutputParentChildDataTable"/> object, i.e. a parent and child <see cref="DataTable"/> object with a 1:n relation. /// </summary> /// <param name="value">Homogeneous informations in some <see cref="InfoOutputParentChildDataTable"/> representation.</param> /// <exception cref="ArgumentNullException">Thrown, if <paramref name="value"/> is <c>null</c>.</exception> /// <exception cref="ArgumentException">Thrown, if the table name(s) of <paramref name="value"/> is empty.</exception> public void Add(InfoOutputParentChildDataTable value) { if (value == null) { throw new ArgumentNullException("value"); } if ((value.ParentDataTable == null) || (value.ParentDataTable.TableName == null) || (value.ParentDataTable.TableName.Length == 0)) { throw new ArgumentException(String.Format(ExceptionMessages.ArgumentIsNotWellDefined, "Parent DataTable name"), "value"); } m_ParentChildTables.Add(value.ParentDataTable.TableName, value); }
/// <summary>Initializes a new instance of the <see cref="InfoOutputPackage"/> class. /// </summary> /// <param name="categoryName">The name of the category, i.e. the name of the current instance.</param> internal InfoOutputPackage(IdentifierString categoryName) { m_Name = categoryName; m_Properties.Add(GeneralPropertyGroupName, m_GeneralProperties); }