public DataService ToDataService(string flowId, string modifiedById, DateTime modifiedOn) { ExecutableInfo executableInfo = null; if (!string.IsNullOrEmpty(PluginImplementerString)) { executableInfo = new ExecutableInfo(PluginImplementerString); } DataService dataService = new DataService(Name, flowId, IsActive, EnumUtils.ParseEnum <ServiceType>(ServiceType), executableInfo, EnumUtils.ParseEnum <DataServicePublishFlags>(PublishFlags)); dataService.ModifiedById = modifiedById; dataService.ModifiedOn = modifiedOn; Dictionary <string, DataProviderInfo> dataSources = null; CollectionUtils.ForEach(DataSources, delegate(KeyedDataSourceSetting dataSource) { DataProviderInfo dataProviderInfo = dataSource.ToDataProviderInfo(modifiedById, modifiedOn); CollectionUtils.Add(dataSource.Key, dataProviderInfo, ref dataSources); }); dataService.DataSources = (dataSources == null) ? null : dataSources; Dictionary <string, string> args = null; CollectionUtils.ForEach(Args, delegate(KeyValueSetting setting) { CollectionUtils.Add(setting.Key, setting.Value, ref args); }); dataService.Args = (args == null) ? null : args; return(dataService); }
public DataProviderInfo ToDataProviderInfo(string modifiedById, DateTime modifiedOn) { DataProviderInfo dataProviderInfo = new DataProviderInfo(Name, ProviderType, ConnectionString); dataProviderInfo.ModifiedById = modifiedById; dataProviderInfo.ModifiedOn = modifiedOn; return(dataProviderInfo); }
public KeyedDataSourceSetting(string key, DataProviderInfo dataSource) : base(dataSource) { Key = key; }
public DataSourceSetting(DataProviderInfo dataSource) { Name = dataSource.Name; ProviderType = dataSource.ProviderType; ConnectionString = dataSource.ConnectionString; }