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);
        }
Ejemplo n.º 3
0
 public void Remove(AdomdProperty value)
 {
     this.collectionInternal.Remove(value);
 }
Ejemplo n.º 4
0
 public void Insert(int index, AdomdProperty value)
 {
     this.collectionInternal.Insert(index, value);
 }
Ejemplo n.º 5
0
 public int IndexOf(AdomdProperty value)
 {
     return(this.collectionInternal.IndexOf(value));
 }
Ejemplo n.º 6
0
 public bool Contains(AdomdProperty value)
 {
     return(this.collectionInternal.Contains(value));
 }
Ejemplo n.º 7
0
 public AdomdProperty Add(AdomdProperty value)
 {
     return((AdomdProperty)this.collectionInternal.Add(value));
 }