コード例 #1
0
 public void Add(DataSetInfo dataSet)
 {
     this.m_dataSetsByID.Add(dataSet.ID, dataSet);
     if (!this.m_dataSetsByName.ContainsKey(dataSet.DataSetName))
     {
         this.m_dataSetsByName.Add(dataSet.DataSetName, dataSet);
     }
 }
コード例 #2
0
        public DataSetInfo GetByID(Guid ID)
        {
            DataSetInfo result = null;

            if (this.m_collectionByID != null)
            {
                this.m_collectionByID.TryGetValue(ID, out result);
            }
            return(result);
        }
コード例 #3
0
        public DataSetInfo GetByName(string name)
        {
            DataSetInfo result = null;

            if (this.m_dataSetsByName != null)
            {
                this.m_dataSetsByName.TryGetValue(name, out result);
            }
            return(result);
        }
コード例 #4
0
 public void Add(DataSetInfo dataSet, ICatalogItemContext report)
 {
     if (Guid.Empty == dataSet.ID)
     {
         this.AddToCollectionByReport(dataSet, report);
     }
     else
     {
         this.AddToCollectionByID(dataSet);
     }
 }
コード例 #5
0
 private void AddToCollectionByID(DataSetInfo dataSet)
 {
     if (this.m_collectionByID == null)
     {
         this.m_collectionByID = new Dictionary <Guid, DataSetInfo>();
     }
     else if (this.m_collectionByID.ContainsKey(dataSet.ID))
     {
         return;
     }
     this.m_collectionByID.Add(dataSet.ID, dataSet);
 }
コード例 #6
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);
        }
コード例 #7
0
 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;
         }
     }
 }
コード例 #8
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);
        }
コード例 #9
0
        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);
        }