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);
     }
 }
Ejemplo n.º 2
0
        public DataSetInfo GetByID(Guid ID)
        {
            DataSetInfo result = null;

            if (this.m_collectionByID != null)
            {
                this.m_collectionByID.TryGetValue(ID, out result);
            }
            return(result);
        }
        public DataSetInfo GetByName(string name)
        {
            DataSetInfo result = null;

            if (this.m_dataSetsByName != null)
            {
                this.m_dataSetsByName.TryGetValue(name, out result);
            }
            return(result);
        }
Ejemplo n.º 4
0
 public void Add(DataSetInfo dataSet, ICatalogItemContext report)
 {
     if (Guid.Empty == dataSet.ID)
     {
         this.AddToCollectionByReport(dataSet, report);
     }
     else
     {
         this.AddToCollectionByID(dataSet);
     }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
        }
 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;
         }
     }
 }
Ejemplo n.º 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);
        }
        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);
        }