/// <summary> /// Create a DataContext instance. /// </summary> /// <param name='dataSource'>Data source.</param> /// <param name='locale'>Locale.</param> public DataContext(IDataSourceInformation dataSource, ILocale locale) { // Set data DataSource = dataSource; IsChanged = false; Locale = locale; }
public IDataSourceInformation GetDataSourceInformation() { _dataSourceInformation = new DataSourceInformation(serviceName, serviceEndPoint, DataSourceType.WebService); return(_dataSourceInformation); }
/// <summary> /// Get information about data source. /// </summary> /// <returns>Information about data source.</returns> public override IDataSourceInformation GetDataSourceInformation() { if (_dataSourceInformation.IsNull()) { _dataSourceInformation = new DataSourceInformation(WebServiceProxy.AnalysisService.GetWebServiceName(), WebServiceProxy.AnalysisService.GetEndpointAddress().ToString(), DataSourceType.WebService); } return(_dataSourceInformation); }
public IDataSourceInformation GetDataSourceInformation() { _dataSourceInformation = new DataSourceInformation(serviceName, serviceEndPoint, DataSourceType.WebService); //_dataSourceInformation.Address = Assembly.GetExecutingAssembly().GetApplicationName() + " " + // Assembly.GetExecutingAssembly().GetApplicationVersion(); //_dataSourceInformation.Name = Settings.Default.OnionDataSourceName; //_dataSourceInformation.Type = DataSourceType.Onion; return(_dataSourceInformation); }
/// <summary> /// Get information about data source. /// </summary> /// <returns>Information about data source.</returns> public override IDataSourceInformation GetDataSourceInformation() { if (_dataSourceInformation.IsNull()) { _dataSourceInformation = new DataSourceInformation( WebServiceProxy.TaxonService.GetWebServiceName(), WebServiceProxy.TaxonService.GetEndpointAddress().ToString(), DataSourceType.WebService); //_dataSourceInformation = new DataSourceInformation(WebServiceProxy.DyntaxaInternalService.GetWebServiceName(), // WebServiceProxy.DyntaxaInternalService.GetEndpointAddress().ToString(), // DataSourceType.WebService); } return(_dataSourceInformation); }
/// <summary> /// Get/set ITransaction by list index. /// </summary> public Boolean IsDataSourceInTransaction(IDataSourceInformation dataSourceInformation) { Boolean isDataSourceInTransaction; isDataSourceInTransaction = false; if (this.IsNotEmpty()) { foreach (ITransaction transaction in this) { if ((transaction.DataSourceInformation.Address == dataSourceInformation.Address) && (transaction.DataSourceInformation.Name == dataSourceInformation.Name) && (transaction.DataSourceInformation.Type == dataSourceInformation.Type)) { isDataSourceInTransaction = true; break; } } } return(isDataSourceInTransaction); }