public IDatastore TransformData(DesignerItemBase transformationItem, List <IDatastore> dataStores, ReportProgressMethod reportProgressMethod) { var transformationItemConfiguration = objectResolver.LoadItemConfiguration(transformationItem.ID) as TransformationConfiguration; IConnection transformationConnectionObject = null; if (transformationItemConfiguration.SelectedConnectionConfigurationId.Equals(Guid.Empty) == false) { transformationConnectionObject = objectResolver.GetConnection(transformationItemConfiguration.SelectedConnectionConfigurationId); } foreach (var dataStore in dataStores) { dataStore.ApplyFilter(transformationItemConfiguration.DataFilter); } IModule transformationObject = objectResolver.GetModule(transformationItem.ID, transformationItem.ModuleDescription.ModuleType); if (transformationObject is IDataTransformation) { ((IDataTransformation)transformationObject).TransformData(transformationConnectionObject, null, dataStores.First(), reportProgressMethod); return(dataStores.First()); } else if (transformationObject is IDataMerge) { if (dataStores.Count != 2) { throw new Exception("Make sure to connect exactly two incoming datasources on JoinRecords transformations!"); } var mergedStore = ((IDataMerge)transformationObject).TransformData(transformationConnectionObject, null, dataStores[0], dataStores[1], reportProgressMethod); return(mergedStore); } else { throw new Exception("Tranformation does not implement a valid Tranformation-Interface!"); } }