private AdomdCommand(AdomdCommand originalCommand)
 {
     this.Connection     = originalCommand.Connection;
     this.CommandText    = originalCommand.CommandText;
     this.CommandStream  = originalCommand.CommandStream;
     this.CommandTimeout = originalCommand.CommandTimeout;
     this.CommandType    = originalCommand.CommandType;
     if (originalCommand.Parameters.Count > 0)
     {
         AdomdParameterCollection adomdParameterCollection = this.Parameters;
         foreach (AdomdParameter adomdParameter in ((IEnumerable)originalCommand.Parameters))
         {
             adomdParameterCollection.Add(adomdParameter.Clone());
         }
     }
     if (originalCommand.Properties.Count > 0)
     {
         AdomdPropertyCollection            properties  = this.Properties;
         AdomdPropertyCollection.Enumerator enumerator2 = originalCommand.Properties.GetEnumerator();
         while (enumerator2.MoveNext())
         {
             AdomdProperty current = enumerator2.Current;
             properties.Add(new AdomdProperty(current.Name, current.Namespace, current.Value));
         }
     }
 }
        private void AddCommandProperty(string propKey, object propValue)
        {
            AdomdProperty adomdProperty = new AdomdProperty(propKey, propValue);

            if (this.commandProperties == null)
            {
                this.commandProperties = new AdomdPropertyCollection();
            }
            else
            {
                int num = this.commandProperties.InternalCollection.IndexOf(adomdProperty);
                if (num != -1)
                {
                    this.commandProperties.InternalCollection.RemoveAt(num);
                }
            }
            this.commandProperties.Add(adomdProperty);
        }
Пример #3
0
 public void Remove(AdomdProperty value)
 {
     this.collectionInternal.Remove(value);
 }
Пример #4
0
 public void Insert(int index, AdomdProperty value)
 {
     this.collectionInternal.Insert(index, value);
 }
Пример #5
0
 public int IndexOf(AdomdProperty value)
 {
     return(this.collectionInternal.IndexOf(value));
 }
Пример #6
0
 public bool Contains(AdomdProperty value)
 {
     return(this.collectionInternal.Contains(value));
 }
Пример #7
0
 public AdomdProperty Add(AdomdProperty value)
 {
     return((AdomdProperty)this.collectionInternal.Add(value));
 }