public CellSet ExecuteCellSet()
        {
            this.CheckCanExecute();
            MDDatasetFormatter formatter = this.connection.IExecuteProvider.ExecuteMultidimensional(this, this.Properties, this.PrivateParameters);

            this.Connection.OpenedReader = null;
            return(new CellSet(this.connection, formatter));
        }
Ejemplo n.º 2
0
 internal OlapInfoAxisCollection(MDDatasetFormatter formatter)
 {
     this.formatter = formatter;
     this.axesCach  = new OlapInfoAxis[formatter.AxesList.Count];
     for (int i = 0; i < this.axesCach.Length; i++)
     {
         this.axesCach[i] = null;
     }
 }
Ejemplo n.º 3
0
        internal OlapInfoCubeCollection(MDDatasetFormatter formatter)
        {
            this.cubesTable = formatter.CubesInfos;
            int num = 0;

            if (this.cubesTable != null)
            {
                num = this.cubesTable.Rows.Count;
            }
            this.cubesCach = new OlapInfoCube[num];
            for (int i = 0; i < this.cubesCach.Length; i++)
            {
                this.cubesCach[i] = null;
            }
        }
Ejemplo n.º 4
0
        private static MDDatasetFormatter ReadDataSetResponsePrivate(XmlReader reader)
        {
            MDDatasetFormatter mDDatasetFormatter = new MDDatasetFormatter();

            if (reader.IsEmptyElement)
            {
                reader.Skip();
            }
            else
            {
                XmlaClient.StartDatasetResponseS(reader);
                mDDatasetFormatter.ReadMDDataset(reader);
                XmlaClient.EndDatasetResponseS(reader);
            }
            return(mDDatasetFormatter);
        }
 private void ReadCubeInfo(XmlReader reader)
 {
     if (!reader.IsStartElement("CubeInfo", "urn:schemas-microsoft-com:xml-analysis:mddataset"))
     {
         FormattersHelpers.CheckException(reader);
         return;
     }
     if (reader.IsEmptyElement)
     {
         reader.Skip();
         return;
     }
     reader.ReadStartElement();
     this.CreateCubesInfosTable();
     this.cubesInfos.BeginLoadData();
     while (reader.IsStartElement("Cube", "urn:schemas-microsoft-com:xml-analysis:mddataset"))
     {
         reader.ReadStartElement();
         DataRow dataRow = this.cubesInfos.NewRow();
         if (reader.IsStartElement("CubeName", "urn:schemas-microsoft-com:xml-analysis:mddataset"))
         {
             dataRow["CubeName"] = FormattersHelpers.ReadDataSetProperty(reader, typeof(string));
         }
         if (reader.IsStartElement("LastDataUpdate", "http://schemas.microsoft.com/analysisservices/2003/engine"))
         {
             dataRow["LastDataUpdate"] = MDDatasetFormatter.GetDateTimeIfValid(reader);
         }
         if (reader.IsStartElement("LastSchemaUpdate", "http://schemas.microsoft.com/analysisservices/2003/engine"))
         {
             dataRow["LastSchemaUpdate"] = MDDatasetFormatter.GetDateTimeIfValid(reader);
         }
         this.cubesInfos.Rows.Add(dataRow);
         FormattersHelpers.CheckException(reader);
         reader.ReadEndElement();
     }
     this.cubesInfos.EndLoadData();
     FormattersHelpers.CheckException(reader);
     reader.ReadEndElement();
 }
Ejemplo n.º 6
0
        public static CellSet LoadXml(XmlReader xmlTextReader)
        {
            if (xmlTextReader == null)
            {
                throw new ArgumentNullException("xmlTextReader");
            }
            if (xmlTextReader.ReadState != ReadState.Initial && xmlTextReader.ReadState != ReadState.Interactive)
            {
                throw new ArgumentException(SR.CellSet_InvalidStateOfReader(xmlTextReader.ReadState.ToString()), "xmlTextReader");
            }
            CellSet result;

            try
            {
                XmlReader reader;
                if (xmlTextReader is XmlaReader)
                {
                    ((XmlaReader)xmlTextReader).SkipElements = true;
                    reader = xmlTextReader;
                }
                else
                {
                    reader = new SkippingWrapperReader(xmlTextReader);
                }
                MDDatasetFormatter formatter = SoapFormatter.ReadDataSetResponse(reader);
                CellSet            cellSet   = new CellSet(formatter);
                result = cellSet;
            }
            catch (XmlaException innerException)
            {
                throw new AdomdErrorResponseException(innerException);
            }
            catch (XmlException innerException2)
            {
                throw new AdomdUnknownResponseException(XmlaSR.UnknownServerResponseFormat, innerException2);
            }
            return(result);
        }
 internal OlapInfo(MDDatasetFormatter formatter)
 {
     this.formatter = formatter;
 }
 internal CellInfo(MDDatasetFormatter formatter)
 {
     this.cellsTable = formatter.CellTable;
     this.properties = null;
 }
        public object Execute()
        {
            this.CheckCanExecute();
            XmlaReader xmlaReader = null;

            xmlaReader = this.connection.IExecuteProvider.Execute(this, this.Properties, this.PrivateParameters);
            this.Connection.OpenedReader = null;
            if (xmlaReader == null)
            {
                this.connection.MarkCacheNeedsCheckForValidness();
                return(null);
            }
            object result;

            try
            {
                object obj = null;
                if (XmlaClient.IsExecuteResponseS(xmlaReader))
                {
                    XmlaClient.StartExecuteResponseS(xmlaReader);
                    if (XmlaClient.IsDatasetResponseS(xmlaReader))
                    {
                        MDDatasetFormatter mDDatasetFormatter = SoapFormatter.ReadDataSetResponse(xmlaReader);
                        if (mDDatasetFormatter != null)
                        {
                            obj = new CellSet(this.connection, mDDatasetFormatter);
                        }
                    }
                    else if (XmlaClient.IsRowsetResponseS(xmlaReader))
                    {
                        obj = AdomdDataReader.CreateInstance(xmlaReader, CommandBehavior.Default, this.connection);
                    }
                    else if (XmlaClient.IsEmptyResultS(xmlaReader))
                    {
                        this.connection.MarkCacheNeedsCheckForValidness();
                        XmlaClient.ReadEmptyRootS(xmlaReader);
                    }
                    else
                    {
                        if (!XmlaClient.IsMultipleResult(xmlaReader) && !XmlaClient.IsAffectedObjects(xmlaReader))
                        {
                            this.connection.MarkCacheNeedsCheckForValidness();
                            throw new AdomdUnknownResponseException(XmlaSR.UnknownServerResponseFormat, string.Format(CultureInfo.InvariantCulture, "Expected dataset, rowset, empty or multiple results, got {0}", new object[]
                            {
                                xmlaReader.Name
                            }));
                        }
                        this.connection.MarkCacheNeedsCheckForValidness();
                        XmlaClient.ReadMultipleResults(xmlaReader);
                    }
                }
                if (!(obj is AdomdDataReader))
                {
                    xmlaReader.Close();
                }
                else
                {
                    this.Connection.OpenedReader = obj;
                }
                result = obj;
            }
            catch (AdomdUnknownResponseException)
            {
                if (xmlaReader != null)
                {
                    xmlaReader.Close();
                }
                throw;
            }
            catch (AdomdConnectionException)
            {
                throw;
            }
            catch (XmlException innerException)
            {
                if (xmlaReader != null)
                {
                    xmlaReader.Close();
                }
                throw new AdomdUnknownResponseException(XmlaSR.UnknownServerResponseFormat, innerException);
            }
            catch (IOException innerException2)
            {
                if (this.connection != null)
                {
                    this.connection.Close(false);
                }
                throw new AdomdConnectionException(XmlaSR.ConnectionBroken, innerException2);
            }
            catch (XmlaException innerException3)
            {
                if (xmlaReader != null)
                {
                    xmlaReader.Close();
                }
                throw new AdomdErrorResponseException(innerException3);
            }
            catch
            {
                if (this.connection != null)
                {
                    this.connection.Close(false);
                }
                throw;
            }
            return(result);
        }
 internal AxesInfo(MDDatasetFormatter formatter)
 {
     this.formatter = formatter;
 }
Ejemplo n.º 11
0
 internal CubeInfo(MDDatasetFormatter formatter)
 {
     this.formatter = formatter;
     this.theCubes  = null;
 }
Ejemplo n.º 12
0
 internal CellSet(AdomdConnection connection, MDDatasetFormatter formatter)
 {
     this.datasetFormatter = formatter;
     this.connection       = connection;
     this.cubeName         = formatter.CubeName;
 }
Ejemplo n.º 13
0
 internal CellSet(MDDatasetFormatter formatter) : this(null, formatter)
 {
 }