Exemple #1
0
        public SortedDictionary <string, ADOTabularMeasure> Visit(ADOTabularMeasureCollection measures)
        {
            //RRomano: Better way to reuse this method in the two visitors? Create an abstract class of a visitor so that code can be shared (csdl doesnt seem to have the DAX expression)

            var ret = MetaDataVisitorADOMD.VisitMeasures(measures, this._conn);

            return(ret);
        }
        public SortedDictionary <string, ADOTabularMeasure> Visit(ADOTabularMeasureCollection measures)
        {
            if (measures == null)
            {
                throw new ArgumentNullException(nameof(measures));
            }
            //RRomano: Better way to reuse this method in the two visitors?
            // Create an abstract class of a visitor so that code can be shared
            // (csdl doesnt seem to have the DAX expression)

            var ret = MetaDataVisitorADOMD.VisitMeasures(measures, this._conn);

            return(ret);
        }
        public ADOTabularConnection(string connectionString, AdomdType connectionType, bool showHiddenObjects, ADOTabularMetadataDiscovery vistorType)
        {
            ShowHiddenObjects = showHiddenObjects;
            ConnectionString  = connectionString;
            _adomdConn        = new AdomdConnection(ConnectionString, connectionType);
            _connectionType   = connectionType;
            //   _adomdConn.ConnectionString = connectionString;

            //_adomdConn.Open();
            if (vistorType == ADOTabularMetadataDiscovery.Adomd)
            {
                Visitor = new MetaDataVisitorADOMD(this);
            }
            else
            {
                Visitor = new MetaDataVisitorCSDL(this);
            }
            ConnectionChanged?.Invoke(this, new EventArgs());
        }
        public ADOTabularConnection(string connectionString, AdomdType connectionType, bool showHiddenObjects, ADOTabularMetadataDiscovery vistorType)
        {
            ShowHiddenObjects = showHiddenObjects;
            ConnectionString = connectionString;
            _adomdConn = new AdomdConnection(ConnectionString,connectionType);
            _connectionType = connectionType;
             //   _adomdConn.ConnectionString = connectionString;

            //_adomdConn.Open();
            if (vistorType == ADOTabularMetadataDiscovery.Adomd)
            {
                Visitor = new MetaDataVisitorADOMD(this);
            }
            else
            {
                Visitor = new MetaDataVisitorCSDL(this);
            }
            if (ConnectionChanged != null)
                ConnectionChanged(this, new EventArgs());
        }