private void SetConnectionStringUseridReference(bool hasUseridReference) { if (hasUseridReference) { this.m_flags |= DataSourceFlags.ConnectionStringUseridReference; } else { this.m_flags &= ~DataSourceFlags.ConnectionStringUseridReference; } }
public void CopyFrom(DataSourceInfo copy, string referencePath, Guid linkToCatalogItemId, bool isEmbeddedInModel) { this.LinkToStandAlone(copy, referencePath, linkToCatalogItemId); this.m_flags = copy.m_flags; this.m_modelID = copy.ModelID; this.m_modelLastUpdatedTime = copy.ModelLastUpdatedTime; this.m_isEmbeddedInModel = isEmbeddedInModel; if (isEmbeddedInModel) { this.IsModel = true; } }
private void InitDefaultsOnCreation() { this.m_extension = null; this.m_dataSourceReference = null; this.m_linkID = Guid.Empty; this.m_credentialsRetrieval = CredentialsRetrievalOption.Unknown; this.m_prompt = string.Format(CultureInfo.CurrentCulture, RPRes.rsDataSourcePrompt); this.m_userNameEncrypted = null; this.m_passwordEncrypted = null; this.m_flags = (DataSourceFlags.Enabled | DataSourceFlags.ReferenceIsValid); this.m_originalConnectStringExpressionBased = false; }
public void LinkModelToDataSource(DataSourceInfo standAlone, Guid modelID) { this.m_DataSourceWithCredentialsId = standAlone.m_DataSourceWithCredentialsId; this.m_extension = standAlone.m_extension; this.m_connectionStringEncrypted = standAlone.m_connectionStringEncrypted; this.m_credentialsRetrieval = standAlone.CredentialsRetrieval; this.m_prompt = standAlone.Prompt; this.m_userNameEncrypted = standAlone.m_userNameEncrypted; this.m_passwordEncrypted = standAlone.m_passwordEncrypted; this.Enabled = standAlone.Enabled; this.ImpersonateUser = standAlone.ImpersonateUser; this.m_flags = standAlone.m_flags; this.m_modelID = modelID; this.m_isEmbeddedInModel = false; this.IsModel = true; }
public DataSourceInfo(SerializationInfo info, StreamingContext context) { this.m_id = (Guid)info.GetValue("id", typeof(Guid)); this.m_DataSourceWithCredentialsId = (Guid)info.GetValue("originalid", typeof(Guid)); this.m_name = (string)info.GetValue("name", typeof(string)); this.m_originalName = (string)info.GetValue("originalname", typeof(string)); this.m_extension = (string)info.GetValue("extension", typeof(string)); this.m_connectionStringEncrypted = (byte[])info.GetValue("connectionstringencrypted", typeof(byte[])); this.m_originalConnectionStringEncrypted = (byte[])info.GetValue("originalconnectionstringencrypted", typeof(byte[])); this.m_originalConnectStringExpressionBased = (bool)info.GetValue("originalConnectStringExpressionBased", typeof(bool)); this.m_dataSourceReference = (string)info.GetValue("datasourcereference", typeof(string)); this.m_linkID = (Guid)info.GetValue("linkid", typeof(Guid)); this.m_secDesc = (byte[])info.GetValue("secdesc", typeof(byte[])); this.m_credentialsRetrieval = (CredentialsRetrievalOption)info.GetValue("credentialsretrieval", typeof(CredentialsRetrievalOption)); this.m_prompt = (string)info.GetValue("prompt", typeof(string)); this.m_userNameEncrypted = (byte[])info.GetValue("usernameencrypted", typeof(byte[])); this.m_passwordEncrypted = (byte[])info.GetValue("passwordencrypted", typeof(byte[])); this.m_flags = (DataSourceFlags)info.GetValue("datasourceflags", typeof(DataSourceFlags)); this.m_modelID = (Guid)info.GetValue("modelid", typeof(Guid)); this.m_modelLastUpdatedTime = (DateTime?)info.GetValue("modellastupdatedtime", typeof(DateTime?)); this.m_isEmbeddedInModel = (bool)info.GetValue("isembeddedinmodel", typeof(bool)); }
public DataSourceInfo(Guid id, Guid originalId, string name, string originalName, string extension, byte[] connectionStringEncrypted, byte[] originalConnectionStringEncypted, bool originalConnectStringExpressionBased, string dataSourceReference, Guid linkID, byte[] secDesc, CredentialsRetrievalOption credentialsRetrieval, string prompt, byte[] userNameEncrypted, byte[] passwordEncrypted, int flags, bool isModelSecurityUsed) { this.m_id = id; this.m_DataSourceWithCredentialsId = originalId; this.m_name = name; this.m_originalName = originalName; this.m_extension = extension; this.m_connectionStringEncrypted = connectionStringEncrypted; this.m_originalConnectionStringEncrypted = originalConnectionStringEncypted; this.m_originalConnectStringExpressionBased = originalConnectStringExpressionBased; this.m_dataSourceReference = dataSourceReference; this.m_linkID = linkID; this.m_secDesc = secDesc; this.m_credentialsRetrieval = credentialsRetrieval; this.m_prompt = prompt; if (this.m_credentialsRetrieval != CredentialsRetrievalOption.Store && (userNameEncrypted != null || passwordEncrypted != null)) { throw new InternalCatalogException("unexpected data source type"); } this.m_userNameEncrypted = userNameEncrypted; this.m_passwordEncrypted = passwordEncrypted; this.m_flags = (DataSourceFlags)flags; this.m_isModelSecurityUsed = isModelSecurityUsed; }