コード例 #1
0
        public void ConvertTable(string entityName, Table table)
        {
            OnTableProcessing?.Invoke(this, new TableEventArgs(entityName, table));

            foreach (var row in table.Rows)
            {
                OnRowProcessing?.Invoke(this, new TableRowEventArgs(entityName, row));

                var attribute = GlobalTestingContext.Metadata.GetAttributeMetadata(entityName, row[Constants.SpecFlow.TABLE_KEY], _context.LanguageCode);

                if (row.ContainsKey(Constants.SpecFlow.TABLE_KEY))
                {
                    row[Constants.SpecFlow.TABLE_KEY] = attribute.LogicalName;
                }

                if (row.ContainsKey(Constants.SpecFlow.TABLE_VALUE))
                {
                    row[Constants.SpecFlow.TABLE_VALUE] = CheckFormula(attribute, row[Constants.SpecFlow.TABLE_VALUE]);
                }

                OnRowProcessed?.Invoke(this, new TableRowEventArgs(entityName, row));
            }

            OnTableProcessed?.Invoke(this, new TableEventArgs(entityName, table));
        }
コード例 #2
0
        public void ConvertTable(string entityName, Table table)
        {
            OnTableProcessing?.Invoke(this, new TableEventArgs(entityName, table));

            foreach (var row in table.Rows)
            {
                OnRowProcessing?.Invoke(this, new TableRowEventArgs(entityName, row));

                row[Constants.SpecFlow.TABLE_KEY] = GlobalTestingContext.Metadata.GetAttributeMetadata(entityName, row[Constants.SpecFlow.TABLE_KEY], _context.LanguageCode).LogicalName;

                OnRowProcessed?.Invoke(this, new TableRowEventArgs(entityName, row));
            }

            OnTableProcessed?.Invoke(this, new TableEventArgs(entityName, table));
        }