Exemple #1
0
        public void ReadAllDatasourcesInMyOrg(int orgId, Action <List <DTO.DatasourceDto>, Exception> completed)
        {
            _readOrgCompleted = completed;
            datasourceCtx     = new DatasourceDomainContext();

            // InvokeOperation<IEnumerable<DTO.DatasourceDto>> readAllDSResults = datasourceCtx.ReadAllDatasourcesInMyOrg(orgId);
            //readAllDSResults.Completed += new EventHandler(readAllDSResults_Completed);
        }
Exemple #2
0
        /// <summary>
        /// Gets the columns for datasource.
        /// </summary>
        /// <param name="dataSourceName">Name of the data source.</param>
        /// <param name="columnsForDatasourceCompleted">The columns for datasource completed.</param>
        public void GetColumnsForDatasource(string dataSourceName, Action <List <EwavColumn>, Exception> completed)
        {
            DatasourceDomainContext dataSourceCtx = new DatasourceDomainContext();

            dataSourceCtx.GetColumnsForDatasource(dataSourceName, result =>
            {
                Exception ex = null;
                if (result.HasError)
                {
                    result.MarkErrorAsHandled();
                    ex = result.Error;
                    throw new GadgetException(result.Error.Message);
                }

                List <EwavColumn> allColumns = ((InvokeOperation <List <EwavColumn> >)result).Value;
                completed(allColumns, ex);
            }, null);
        }
Exemple #3
0
 /// <summary>
 /// public ctor
 /// </summary>
 public DatasourceServiceAgent()
 {
     datasourceCtx = new DatasourceDomainContext();
 }