public DataSourcePromptCollection GetPromptRepresentatives(ServerDataSourceSettings serverDatasourceSettings) { if (this.m_collectionByPrompt == null) { return(new DataSourcePromptCollection()); } return(this.m_collectionByPrompt.GetPromptRepresentatives(serverDatasourceSettings)); }
public DataSourcePromptCollection GetPromptRepresentatives(ServerDataSourceSettings serverDatasourceSettings) { DataSourcePromptCollection dataSourcePromptCollection = new DataSourcePromptCollection(); for (int i = 0; i < this.Count; i++) { dataSourcePromptCollection.Add(this[i].GetRepresentative(), serverDatasourceSettings); } return(dataSourcePromptCollection); }
public void Add(DataSourceInfo dataSource, ServerDataSourceSettings serverDatasourceSettings) { string originalName = dataSource.OriginalName; Global.Tracer.Assert(this.m_collection[originalName] == null, "Collection already contains this data source."); dataSource.ThrowIfNotUsable(serverDatasourceSettings); this.m_collection.Add(originalName, dataSource); if (dataSource.NeedPrompt) { this.m_needPrompt = true; } }
public void AddSingleIfPrompt(DataSourceInfo dataSource, ServerDataSourceSettings serverDatasourceSettings) { Global.Tracer.Assert(dataSource.OriginalName == null, "Data source has non-null name when adding single"); if (this.m_collection.Count != 0) { throw new InternalCatalogException("Prompt collection is not empty when adding single data source"); } if (dataSource.CredentialsRetrieval == DataSourceInfo.CredentialsRetrievalOption.Prompt) { dataSource.ThrowIfNotUsable(serverDatasourceSettings); this.m_collection.Add("", dataSource); if (dataSource.NeedPrompt) { this.m_needPrompt = true; } } }
public void ThrowIfNotUsable(ServerDataSourceSettings serverDatasourceSetting) { if (!this.Enabled) { throw new DataSourceDisabledException(); } if (!this.ReferenceIsValid) { throw new InvalidDataSourceReferenceException(this.OriginalName); } if (!this.GoodForLiveExecution(serverDatasourceSetting.IsSurrogatePresent)) { throw new InvalidDataSourceCredentialSettingException(); } if (this.m_credentialsRetrieval != CredentialsRetrievalOption.Integrated) { return; } if (serverDatasourceSetting.AllowIntegratedSecurity) { return; } throw new WindowsIntegratedSecurityDisabledException(); }