Example #1
0
 /// <remarks/>
 public void SetDataSourceContentsAsync(string DataSource, DataSourceDefinition Definition, object userState) {
     if ((this.SetDataSourceContentsOperationCompleted == null)) {
         this.SetDataSourceContentsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDataSourceContentsOperationCompleted);
     }
     this.InvokeAsync("SetDataSourceContents", new object[] {
                 DataSource,
                 Definition}, this.SetDataSourceContentsOperationCompleted, userState);
 }
Example #2
0
 public void SetDataSourceContents(string DataSource, DataSourceDefinition Definition) {
     this.Invoke("SetDataSourceContents", new object[] {
                 DataSource,
                 Definition});
 }
Example #3
0
 /// <remarks/>
 public void SetDataSourceContentsAsync(string DataSource, DataSourceDefinition Definition) {
     this.SetDataSourceContentsAsync(DataSource, Definition, null);
 }
Example #4
0
 /// <remarks/>
 public void CreateDataSourceAsync(string DataSource, string Parent, bool Overwrite, DataSourceDefinition Definition, Property[] Properties, object userState) {
     if ((this.CreateDataSourceOperationCompleted == null)) {
         this.CreateDataSourceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateDataSourceOperationCompleted);
     }
     this.InvokeAsync("CreateDataSource", new object[] {
                 DataSource,
                 Parent,
                 Overwrite,
                 Definition,
                 Properties}, this.CreateDataSourceOperationCompleted, userState);
 }
Example #5
0
 /// <remarks/>
 public void CreateDataSourceAsync(string DataSource, string Parent, bool Overwrite, DataSourceDefinition Definition, Property[] Properties) {
     this.CreateDataSourceAsync(DataSource, Parent, Overwrite, Definition, Properties, null);
 }
Example #6
0
 public void CreateDataSource(string DataSource, string Parent, bool Overwrite, DataSourceDefinition Definition, Property[] Properties) {
     this.Invoke("CreateDataSource", new object[] {
                 DataSource,
                 Parent,
                 Overwrite,
                 Definition,
                 Properties});
 }
        private static void CreateDataSources(ReportingService2005 reportingService, string path)
        {
            if (reportingService == null)
                throw new ArgumentNullException("reportingService");

            if (string.IsNullOrEmpty(path))
                throw new ArgumentException("path");

            foreach (DataSourceItem dataSource in SetupDataSourceItems)
            {
                DataSourceDefinition def = new DataSourceDefinition();
                def.ConnectString = dataSource.ConnectString;

                switch (dataSource.CredentialsRetrieval)
                {
                    case "Integrated":
                        def.CredentialRetrieval = CredentialRetrievalEnum.Integrated; break;
                    case "None":
                        def.CredentialRetrieval = CredentialRetrievalEnum.None; break;
                    case "Prompt":
                        def.CredentialRetrieval = CredentialRetrievalEnum.Prompt; break;
                    case "Store":
                        def.CredentialRetrieval = CredentialRetrievalEnum.Store; break;
                }

                def.Enabled = dataSource.Enabled;
                def.EnabledSpecified = dataSource.EnabledSpecified;
                def.Extension = dataSource.Extension;
                def.ImpersonateUser = dataSource.ImpersonateUser;
                def.ImpersonateUserSpecified = dataSource.ImpersonateUserSpecified;
                def.OriginalConnectStringExpressionBased = dataSource.OriginalConnectStringExpressionBased;
                def.Password = dataSource.Password;
                def.Prompt = dataSource.Prompt;
                def.UseOriginalConnectString = dataSource.UseOriginalConnectString;
                def.UserName = dataSource.UserName;
                def.WindowsCredentials = dataSource.WindowsCredentials;

                string fullPath = string.Format(dataSource.Path, path);
                string parent = TesterUtility.GetParentPath(fullPath);

                reportingService.CreateDataSource(dataSource.Name, parent, true, def, null);
            }
        }
        private static void CreateDataSource(ReportingService2005 reportingService, DataSourceItem dataSource)
        {
            if (reportingService == null)
                throw new ArgumentNullException("reportingService");

            if (dataSource == null)
                throw new ArgumentNullException("dataSource");

            DataSourceDefinition def = new DataSourceDefinition();
            def.ConnectString = dataSource.ConnectString;

            switch (dataSource.CredentialsRetrieval)
            {
                case "Integrated":
                    def.CredentialRetrieval = CredentialRetrievalEnum.Integrated; break;
                case "None":
                    def.CredentialRetrieval = CredentialRetrievalEnum.None; break;
                case "Prompt":
                    def.CredentialRetrieval = CredentialRetrievalEnum.Prompt; break;
                case "Store":
                    def.CredentialRetrieval = CredentialRetrievalEnum.Store; break;
            }

            def.Enabled = dataSource.Enabled;
            def.EnabledSpecified = dataSource.EnabledSpecified;
            def.Extension = dataSource.Extension;
            def.ImpersonateUser = dataSource.ImpersonateUser;
            def.ImpersonateUserSpecified = dataSource.ImpersonateUserSpecified;
            def.OriginalConnectStringExpressionBased = dataSource.OriginalConnectStringExpressionBased;
            def.Password = dataSource.Password;
            def.Prompt = dataSource.Prompt;
            def.UseOriginalConnectString = dataSource.UseOriginalConnectString;
            def.UserName = dataSource.UserName;
            def.WindowsCredentials = dataSource.WindowsCredentials;

            string parent = TesterUtility.GetParentPath(dataSource.Path);

            ReportingService2005TestEnvironment.CreateFolderFromPath(reportingService, parent);

            reportingService.CreateDataSource(dataSource.Name, parent, true, def, null);
        }