Beispiel #1
0
        public DataSetInfo GetByName(string name, ICatalogItemContext item)
        {
            DataSetInfo result = null;

            if (this.m_collectionByReport != null)
            {
                DataSetInfoCollection dataSetInfoCollection = null;
                if (this.m_collectionByReport.TryGetValue(item.StableItemPath, out dataSetInfoCollection))
                {
                    result = dataSetInfoCollection.GetByName(name);
                }
            }
            return(result);
        }
 public void CombineOnSetDataSets(DataSetInfoCollection newDataSets)
 {
     if (newDataSets != null)
     {
         foreach (DataSetInfo newDataSet in newDataSets)
         {
             DataSetInfo byName = this.GetByName(newDataSet.DataSetName);
             if (byName == null)
             {
                 throw new DataSetNotFoundException(newDataSet.DataSetName.MarkAsPrivate());
             }
             byName.AbsolutePath          = newDataSet.AbsolutePath;
             byName.LinkedSharedDataSetID = Guid.Empty;
         }
     }
 }
Beispiel #3
0
        private void AddToCollectionByReport(DataSetInfo dataSet, ICatalogItemContext report)
        {
            DataSetInfoCollection dataSetInfoCollection = null;

            if (this.m_collectionByReport == null)
            {
                this.m_collectionByReport = new Dictionary <string, DataSetInfoCollection>(StringComparer.Ordinal);
            }
            else
            {
                this.m_collectionByReport.TryGetValue(report.StableItemPath, out dataSetInfoCollection);
            }
            if (dataSetInfoCollection == null)
            {
                dataSetInfoCollection = new DataSetInfoCollection();
                this.m_collectionByReport.Add(report.StableItemPath, dataSetInfoCollection);
            }
            dataSetInfoCollection.Add(dataSet);
        }
        public DataSetInfoCollection CombineOnSetDefinition(DataSetInfoCollection newDataSets)
        {
            DataSetInfoCollection dataSetInfoCollection = new DataSetInfoCollection();

            if (newDataSets == null)
            {
                return(dataSetInfoCollection);
            }
            foreach (DataSetInfo newDataSet in newDataSets)
            {
                DataSetInfo byName = this.GetByName(newDataSet.DataSetName);
                if (byName == null)
                {
                    dataSetInfoCollection.Add(newDataSet);
                }
                else
                {
                    byName.ID = newDataSet.ID;
                    dataSetInfoCollection.Add(byName);
                }
            }
            return(dataSetInfoCollection);
        }