public int ExecuteNonQuery() { if (_obj != null) { _obj.Parameters.Clear(); foreach (AdomdParameter param in _parameters) { _obj.Parameters.Add(new Microsoft.AnalysisServices.AdomdClient.AdomdParameter(param.Name, param.Value)); } return(_obj.ExecuteNonQuery()); } else { ExcelAdoMdConnections.ReturnDelegate <int> f = delegate { _objExcel.Parameters.Clear(); foreach (AdomdParameter param in _parameters) { _objExcel.Parameters.Add(new ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.AdomdParameter(param.Name, param.Value)); } return(_objExcel.ExecuteNonQuery()); }; return(f()); } }
public MemberCollection GetMembers(long start, long count, string[] properties, params MemberFilter[] filters) { if (_obj != null) { MemberCollection coll = new MemberCollection(); foreach (AsAdomdClient.Member member in _obj.GetMembers(start, count, properties, new AsAdomdClient.MemberFilter[] { })) { coll.Add(new Member(member)); } return(coll); } else { ExcelAdoMdConnections.ReturnDelegate <MemberCollection> f = delegate { MemberCollection coll = new MemberCollection(); foreach (ExcelAdomdClient.Member member in _objExcel.GetMembers(start, count, properties, new ExcelAdomdClient.MemberFilter[] { })) { coll.Add(new Member(member)); } return(coll); }; return(f()); } }
public DataSet GetSchemaDataSet(string schemaName, AdomdRestrictionCollection restrictions) { if (_type == AdomdType.AnalysisServices) { AsAdomdClient.AdomdRestrictionCollection coll = new AsAdomdClient.AdomdRestrictionCollection(); foreach (AdomdRestriction res in restrictions) { coll.Add(new AsAdomdClient.AdomdRestriction(res.Name, res.Value)); } return(_conn.GetSchemaDataSet(schemaName, coll)); } else { ExcelAdoMdConnections.ReturnDelegate <DataSet> f = delegate { ExcelAdomdClient.AdomdRestrictionCollection coll = new ExcelAdomdClient.AdomdRestrictionCollection(); foreach (AdomdRestriction res in restrictions) { coll.Add(new ExcelAdomdClient.AdomdRestriction(res.Name, res.Value)); } return(_connExcel.GetSchemaDataSet(schemaName, coll)); }; return(f()); } }
public AdomdDataReader ExecuteReader() { if (_obj != null) { _obj.Parameters.Clear(); foreach (AdomdParameter param in _parameters) { _obj.Parameters.Add(new AsAdomdClient.AdomdParameter(param.Name, param.Value)); } return(new AdomdDataReader(_obj.ExecuteReader())); } else { ExcelAdoMdConnections.ReturnDelegate <AdomdDataReader> f = delegate { _objExcel.Parameters.Clear(); foreach (AdomdParameter param in _parameters) { _objExcel.Parameters.Add(new ExcelAdomdClient.AdomdParameter(param.Name, param.Value)); } return(new AdomdDataReader(_objExcel.ExecuteReader())); }; return(f()); } }
public string GetName(int ordinal) { if (_type == AdomdType.AnalysisServices) { return(_reader.GetName(ordinal)); } else { ExcelAdoMdConnections.ReturnDelegate <string> f = delegate { return(_readerExcel.GetName(ordinal)); }; return(f()); } }
public Guid GetGuid(int i) { if (_type == AdomdType.AnalysisServices) { return(_obj.GetGuid(i)); } else { ExcelAdoMdConnections.ReturnDelegate <Guid> f = delegate { return(_objExcel.GetGuid(i)); }; return(f()); } }
public decimal GetDecimal(int i) { if (_type == AdomdType.AnalysisServices) { return(_obj.GetDecimal(i)); } else { ExcelAdoMdConnections.ReturnDelegate <decimal> f = delegate { return(_objExcel.GetDecimal(i)); }; return(f()); } }
public int GetValues(object[] values) { if (_type == AdomdType.AnalysisServices) { return(_obj.GetValues(values)); } else { ExcelAdoMdConnections.ReturnDelegate <int> f = delegate { return(_objExcel.GetValues(values)); }; return(f()); } }
public string GetString(int i) { if (_type == AdomdType.AnalysisServices) { return(_obj.GetString(i)); } else { ExcelAdoMdConnections.ReturnDelegate <string> f = delegate { return(_objExcel.GetString(i)); }; return(f()); } }
public object GetValue(int i) { if (_type == AdomdType.AnalysisServices) { return(_obj.GetValue(i)); } else { ExcelAdoMdConnections.ReturnDelegate <object> f = delegate { return(_objExcel.GetValue(i)); }; return(f()); } }
public bool Read() { if (_type == AdomdType.AnalysisServices) { return(_reader.Read()); } else { ExcelAdoMdConnections.ReturnDelegate <bool> f = delegate { return(_readerExcel.Read()); }; return(f()); } }
public int GetOrdinal(string name) { if (_type == AdomdType.AnalysisServices) { return(_obj.GetOrdinal(name)); } else { ExcelAdoMdConnections.ReturnDelegate <int> f = delegate { return(_objExcel.GetOrdinal(name)); }; return(f()); } }
public short GetInt16(int i) { if (_type == AdomdType.AnalysisServices) { return(_obj.GetInt16(i)); } else { ExcelAdoMdConnections.ReturnDelegate <short> f = delegate { return(_objExcel.GetInt16(i)); }; return(f()); } }
public DateTime GetDateTime(int i) { if (_type == AdomdType.AnalysisServices) { return(_obj.GetDateTime(i)); } else { ExcelAdoMdConnections.ReturnDelegate <DateTime> f = delegate { return(_objExcel.GetDateTime(i)); }; return(f()); } }
public DataTable GetSchemaTable() { if (_type == AdomdType.AnalysisServices) { return(_obj.GetSchemaTable()); } else { ExcelAdoMdConnections.ReturnDelegate <DataTable> f = delegate { return(_objExcel.GetSchemaTable()); }; return(f()); } }
public IDataReader GetData(int i) { if (_type == AdomdType.AnalysisServices) { return(_obj.GetData(i)); } else { ExcelAdoMdConnections.ReturnDelegate <IDataReader> f = delegate { return(_objExcel.GetData(i)); }; return(f()); } }
public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) { if (_type == AdomdType.AnalysisServices) { return(_obj.GetChars(i, fieldoffset, buffer, bufferoffset, length)); } else { ExcelAdoMdConnections.ReturnDelegate <long> f = delegate { return(_objExcel.GetChars(i, fieldoffset, buffer, bufferoffset, length)); }; return(f()); } }
public bool IsDBNull(int i) { if (_type == AdomdType.AnalysisServices) { return(_obj.IsDBNull(i)); } else { ExcelAdoMdConnections.ReturnDelegate <bool> f = delegate { return(_objExcel.IsDBNull(i)); }; return(f()); } }
public bool NextResult() { if (_type == AdomdType.AnalysisServices) { return(_obj.NextResult()); } else { ExcelAdoMdConnections.ReturnDelegate <bool> f = delegate { return(_objExcel.NextResult()); }; return(f()); } }
public CubeDef Find(string index) { if (_obj != null) { Microsoft.AnalysisServices.AdomdClient.CubeDef obj = _obj.Find(index); return(obj == null ? null : new CubeDef(obj)); } else { ExcelAdoMdConnections.ReturnDelegate <CubeDef> f = delegate { ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.CubeDef obj = _objExcel.Find(index); return(obj == null ? null : new CubeDef(obj)); }; return(f()); } }
public CubeDef Find(string index) { if (_obj != null) { AsAdomdClient.CubeDef obj = _obj.Find(index); return(obj == null ? null : new CubeDef(obj)); } else { ExcelAdoMdConnections.ReturnDelegate <CubeDef> f = delegate { ExcelAdomdClient.CubeDef obj = _objExcel.Find(index); return(obj == null ? null : new CubeDef(obj)); }; return(f()); } }
public DataSet GetSchemaDataSet(string schemaName, AdomdRestrictionCollection restrictions, bool throwOnInlineErrors) { if (_type == AdomdType.AnalysisServices) { global::Microsoft.AnalysisServices.AdomdClient.AdomdRestrictionCollection coll = new global::Microsoft.AnalysisServices.AdomdClient.AdomdRestrictionCollection(); if (restrictions != null) { foreach (AdomdClientWrappers.AdomdRestriction res in restrictions) { coll.Add(new global::Microsoft.AnalysisServices.AdomdClient.AdomdRestriction(res.Name, res.Value)); } } if (_conn.State != ConnectionState.Open) { _conn.Open(); } lock (rowsetLock) { return(_conn.GetSchemaDataSet(schemaName, coll, throwOnInlineErrors)); } } else { ExcelAdoMdConnections.ReturnDelegate <DataSet> f = delegate { ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.AdomdRestrictionCollection coll = new ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.AdomdRestrictionCollection(); if (restrictions != null) { foreach (AdomdRestriction res in restrictions) { coll.Add(new ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.AdomdRestriction(res.Name, res.Value)); } } if (_connExcel.State != ConnectionState.Open) { _connExcel.Open(); } lock (rowsetLock) { return(_connExcel.GetSchemaDataSet(schemaName, coll, throwOnInlineErrors)); } }; return(f()); } }
public object this[string index] { get { if (_type == AdomdType.AnalysisServices) { return(_reader[index]); } else { ExcelAdoMdConnections.ReturnDelegate <object> f = delegate { return(_readerExcel[index]); }; return(f()); } } }
public object this[int i] { get { if (_type == AdomdType.AnalysisServices) { return(_obj[i]); } else { ExcelAdoMdConnections.ReturnDelegate <object> f = delegate { return(_objExcel[i]); }; return(f()); } } }
public string GetDataReaderValue(int i) { if (_type == AdomdType.AnalysisServices) { //Microsoft.AnalysisServices.AdomdClient.AdomdDataReader rdr = (Microsoft.AnalysisServices.AdomdClient.AdomdDataReader)_obj.GetValue(i); //StringBuilder result = new StringBuilder(); //while (rdr.Read()) { // result.Append(rdr.GetString(0)); //} //rdr.Close(); //return result.ToString(); return(_obj.GetValue(i).ToString()); } else { ExcelAdoMdConnections.ReturnDelegate <string> f = delegate { return(_objExcel.GetValue(i).ToString()); }; return(f()); } }