Ejemplo n.º 1
0
        internal DataSetInfo GetByName(string name, ICatalogItemContext item)
        {
            DataSetInfo result = null;

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

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

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