/// <summary>Adds a specified collection of <see cref="InfoOutputProperty"/> objects to the current instance. /// </summary> /// <param name="propertyGroupName">The name of the property group (i.e. 'General Properties' etc.).</param> /// <param name="properties">The properties to add, if <c>null</c> an empty property group will be added.</param> public void Add(string propertyGroupName, params InfoOutputProperty[] properties) { if (propertyGroupName == null) { throw new ArgumentNullException(nameof(propertyGroupName)); } if (properties != null) { if (m_Properties.TryGetValue(propertyGroupName, out IdentifierStringDictionary <InfoOutputProperty> propertyCollection) == false) { propertyCollection = new IdentifierStringDictionary <InfoOutputProperty>(isReadOnlyExceptAdding: false); m_Properties.Add(propertyGroupName, propertyCollection); } foreach (var property in properties) { propertyCollection.Add(property.Name, property); } } }
public void SetUp() { m_IdentifierStringDictionary = IdentifierStringDictionary.Create <object>("Name of first item", 42.12, "Name of second item", true); }
/// <summary>Initializes a new instance of the <see cref="InfoOutput"/> class. /// </summary> public InfoOutput() { m_Values = new IdentifierStringDictionary <InfoOutputPackage>(isReadOnlyExceptAdding: true); }