Ejemplo n.º 1
0
        internal void SetAltMetaData(_SqlMetaDataSet altMetaDataSet)
        {
            // If altmetadata with same id is found, override it rather than adding a new one
            int newId = altMetaDataSet.id;

            for (int i = 0; i < _altMetaDataSetArray.Count; i++)
            {
                if (_altMetaDataSetArray[i].id == newId)
                {
                    // override the existing metadata with the same id
                    _altMetaDataSetArray[i] = altMetaDataSet;
                    return;
                }
            }

            // if we did not find metadata to override, add as new
            _altMetaDataSetArray.Add(altMetaDataSet);
        }
Ejemplo n.º 2
0
 private _SqlMetaDataSet(_SqlMetaDataSet original)
 {
     this.id = original.id;
     // although indexMap is not immutable, in practice it is initialized once and then passed around
     this.indexMap       = original.indexMap;
     this.visibleColumns = original.visibleColumns;
     if (original._metaDataArray == null)
     {
         _metaDataArray = null;
     }
     else
     {
         _metaDataArray = new _SqlMetaData[original._metaDataArray.Length];
         for (int idx = 0; idx < _metaDataArray.Length; idx++)
         {
             _metaDataArray[idx] = (_SqlMetaData)original._metaDataArray[idx].Clone();
         }
     }
 }