public void Run(DataComponentFacade facade) { var dbProv = DataProviderManager.ReadDatabaseDataProviders(); var providers = DataProviderManager.LoadExternalDataProviders(dbProv, facade.InterfaceType); Run(providers); }
public IEnumerable <TInterface> CreateDataProviders(SourceUsageOrder sourceUsageOrder) { DataProvidersConfigurationSection section = DataProvidersConfigurationSection.GetCurrent(); DataProvider[] dbProviders = DataProviderManager.ReadDatabaseDataProviders(); var dataProviders = DataProviderManager.GetDataProviderList(section, dbProviders, typeof(TInterface), sourceUsageOrder) .Select(p => p as TInterface); return(dataProviders); }
public StandardReturType CreateDataProviders(out IEnumerable <ISingleDataProvider <TInputElement, TOutputElement> > dataProviders, SourceUsageOrder sourceUsageOrder) { DataProvidersConfigurationSection section = DataProvidersConfigurationSection.GetCurrent(); DataProvider[] dbProviders = DataProviderManager.ReadDatabaseDataProviders(); dataProviders = DataProviderManager.GetDataProviderList(section, dbProviders, InterfaceType, sourceUsageOrder) .Select(p => p as ISingleDataProvider <TInputElement, TOutputElement>); if (dataProviders.FirstOrDefault() == null) { Local.Admin.AddNewLog(TraceEventType.Warning, BrokerContext.Current.WebMethodMessageName, TextMessages.NoDataProvidersFound, null, null); return(StandardReturType.Create(HttpErrorCode.DATASOURCE_UNAVAILABLE)); } return(StandardReturType.OK()); }
public virtual SubMethodRunState[] CreateSubMethodRunStates(out bool missingDataProvidersExist) { DataProvidersConfigurationSection section = DataProvidersConfigurationSection.GetCurrent(); DataProvider[] dbProviders = DataProviderManager.ReadDatabaseDataProviders(); var subMethodRunStates = this.SubMethodInfos .Select(mi => new SubMethodRunState() { SubMethodInfo = mi, DataProviders = mi.GetDataProviderList(section, dbProviders) }) .ToArray(); // Now check that each method call info either has at least one clearData provider implementation or can be safely ignored. missingDataProvidersExist = subMethodRunStates.Where(mi => mi.SubMethodInfo.FailIfNoDataProvider && mi.DataProviders.FirstOrDefault() == null).FirstOrDefault() != null; return(subMethodRunStates); }