private TestPropertyCollection collectTestPropertiesFromGrid(bool includeOverrides)
        {
            var testProperties = new TestPropertyCollection();

            foreach (DataGridViewRow row in m_testPropertiesDataGridView.Rows)
            {
                var testProperty = row.Tag as TestProperty;

                if (!testProperty.Overridden || includeOverrides)
                {
                    testProperties.Add(testProperty);
                }
                else if (testProperty.OverriddenValue != null)
                {
                    testProperty.Value       = testProperty.OverriddenValue;
                    testProperty.Description = testProperty.OverriddenDescription;
                    testProperties.Add(testProperty);
                }
            }

            return(testProperties);
        }
Exemple #2
0
        private TestPropertyCollection collectTestProperties()
        {
            var testProperties = new TestPropertyCollection();

            foreach (DataGridViewRow row in m_testPropertiesDataGridView.Rows)
            {
                var testProperty = row.Tag as TestProperty;

                if (!string.IsNullOrEmpty(testProperty.Name))
                {
                    testProperties.Add(testProperty);
                }
                else
                {
                    throw new TestPropertyEditorException(row.Index, NameColumn, "A test property name must be specified.");
                }
            }

            return(testProperties);
        }