public async Task <MeasureGroupCollection> GetMeasureGroupsAync() { if (_MeasureGroups == null) { _MeasureGroups = new MeasureGroupCollection(); } if (_MeasureGroups.Count == 0) { var command = new XmlaCommand("MDSCHEMA_MEASUREGROUPS", Connection); command.CommandRestrictions.CubeName = CubeName; var response = await command.ExecuteAsync(); try { var tasks = response.GetXRows().Select(xrow => xrow.ToXmlaObjectAsync <MeasureGroup>(this)); var results = await Task.WhenAll(tasks); _MeasureGroups.AddRange(results); } catch { throw; } } return(_MeasureGroups); }
public virtual MeasureGroupCollection List(IEnumerable<IFilter> filters) { var measureGroups = new MeasureGroupCollection(); var rows = Discover(filters); foreach (var row in rows) { measureGroups.AddOrIgnore(row.Name); } return measureGroups; }
public virtual MeasureGroupCollection List(IEnumerable <IFilter> filters) { var measureGroups = new MeasureGroupCollection(); var rows = Discover(filters); foreach (var row in rows) { measureGroups.AddOrIgnore(row.Name); } return(measureGroups); }
public void GetMeasureGroups() { var connection = TestHelper.CreateConnectionToSsas(); connection.Open(); CubeDef cube = TestHelper.GetCube(connection); MeasureGroupCollection mgroups = cube.MeasureGroups; connection.Close(); Assert.IsTrue(mgroups.Count > 0); }
public Perspective(string name) { Name = name; MeasureGroups = new MeasureGroupCollection(); Dimensions = new DimensionCollection(); }