How to use MembersDiscoveryRequest method of NBi.Core.Analysis.Request.MembersDiscoveryRequest class

Best NBi code snippet using NBi.Core.Analysis.Request.MembersDiscoveryRequest.MembersDiscoveryRequest

AbstractMembersCollectionConstraint.cs

Source:AbstractMembersCollectionConstraint.cs Github

copy

Full Screen

...15 public abstract class AbstractMembersCollectionConstraint : AbstractMembersConstraint16 {1718 private readonly IDbCommand commandToRetrieveExpectedItems;19 private readonly MembersDiscoveryRequest membersDiscoveryRequest;20 private IEnumerable<string> expectedItems;2122 protected IEnumerable<string> ExpectedItems23 {24 get25 {26 return expectedItems;27 }28 }29 3031 /// <summary>32 /// Construct a AbstractMembersConstraint33 /// </summary>34 /// <param name="expected">The command to retrieve the list of expected items</param>35 public AbstractMembersCollectionConstraint(IDbCommand expected)36 : base()37 {38 commandToRetrieveExpectedItems = expected;39 }4041 /// <summary>42 /// Construct a AbstractMembersConstraint43 /// </summary>44 /// <param name="expected">The list of expected items</param>45 public AbstractMembersCollectionConstraint(IEnumerable<string> expected)46 : base()47 {48 expectedItems = expected;49 }5051 /// <summary>52 /// Construct a AbstractMembersConstraint53 /// </summary>54 /// <param name="expected">The request to discover members in a hierarchy or level</param>55 public AbstractMembersCollectionConstraint(MembersDiscoveryRequest expected)56 : base()57 {58 membersDiscoveryRequest = expected;59 }6061 62 #region Specific NUnit6364 protected override void PreInitializeMatching()65 {66 if (commandToRetrieveExpectedItems != null)67 expectedItems = GetMembersFromResultSet(commandToRetrieveExpectedItems);68 if (membersDiscoveryRequest != null)69 expectedItems = GetMembersFromDiscoveryRequest(membersDiscoveryRequest);70 }717273 protected IEnumerable<string> GetMembersFromResultSet(Object obj)74 {75 var rs = ResultSetBuilder.Build(obj);7677 var members = new List<string>();78 foreach (DataRow row in rs.Rows)79 members.Add(row.ItemArray[0].ToString());8081 return members;82 }8384 protected IEnumerable<string> GetMembersFromDiscoveryRequest(MembersDiscoveryRequest disco)85 {86 var engine = new MembersAdomdEngine();87 var results = engine.GetMembers(disco);8889 var members = results.ToCaptions();90 return members;91 }9293 /// <summary>94 /// Engine dedicated to ResultSet acquisition95 /// </summary>96 protected IResultSetBuilder resultSetBuilder;97 protected internal IResultSetBuilder ResultSetBuilder98 { ...

Full Screen

Full Screen

AbstractMembersConstraint.cs

Source:AbstractMembersConstraint.cs Github

copy

Full Screen

...17 18 /// <summary>19 /// Request for metadata extraction20 /// </summary>21 public MembersDiscoveryRequest Request { get; protected set; }2223 /// <summary>24 /// Engine dedicated to Members acquisition25 /// </summary>26 protected internal MembersAdomdEngine MembersEngine27 {28 get29 {30 if (membersEngine == null)31 membersEngine = new MembersAdomdEngine();32 return membersEngine;33 }34 set35 {36 if (value == null)37 throw new ArgumentNullException();38 membersEngine = value;39 }40 }4142 /// <summary>43 /// Construct a AbstractMembersConstraint44 /// </summary>45 /// <param name="expected"></param>46 public AbstractMembersConstraint()47 {48 Comparer = new NBi.Core.Analysis.Member.Member.ComparerByCaption(true);49 }5051 #region Modifiers52 /// <summary>53 /// Flag the constraint to ignore case and return self.54 /// </summary>55 protected void IgnoreCase()56 {57 Comparer = new NBi.Core.Analysis.Member.Member.ComparerByCaption(false);58 }5960 #endregion61 62 #region Specific NUnit63 public override bool Matches(object actual)64 {65 if (!isInitialized)66 InitializeMatching();67 68 if (actual is MembersDiscoveryRequest)69 return Process((MembersDiscoveryRequest)actual);70 else if (actual is MemberResult)71 {72 this.actual = actual;73 var ctr = internalConstraint;74 if (ctr is NUnitCtr.CollectionItemsEqualConstraint)75 ctr = ((NUnitCtr.CollectionItemsEqualConstraint)ctr).Using(Comparer);76 var res = DoMatch(ctr);77 return res;78 }79 else80 throw new ArgumentException();81 }8283 protected virtual bool DoMatch(NUnitCtr.Constraint ctr)84 {85 return ctr.Matches(actual);86 }878889 private void InitializeMatching()90 {91 PreInitializeMatching();92 internalConstraint = BuildInternalConstraint();93 isInitialized = true;94 }9596 protected virtual void PreInitializeMatching()97 {98 99 }100101 protected abstract NUnitCtr.Constraint BuildInternalConstraint();102103 protected bool Process(MembersDiscoveryRequest actual)104 {105 Request = actual;106 var engine = MembersEngine;107 MemberResult result = engine.GetMembers(Request);108 return this.Matches(result);109 }110111 #endregion112113 }114} ...

Full Screen

Full Screen

MembersDiscoveryRequest

Using AI Code Generation

copy

Full Screen

1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using System.Threading.Tasks;6using NBi.Core.Analysis.Request;7{8 {9 static void Main(string[] args)10 {11 MembersDiscoveryRequest membersRequest = new MembersDiscoveryRequest();12 membersRequest.Cube = "Adventure Works";13 membersRequest.Dimension = "Product";14 membersRequest.Hierarchy = "Product Categories";15 membersRequest.Level = "Category";16 membersRequest.Members = new string[] { "Bikes", "Components" };17 membersRequest.ExcludeMembers = new string[] { "Accessories", "Clothing" };18 membersRequest.IncludeAllLevels = true;19 membersRequest.IncludeAllMembers = true;20 membersRequest.IncludeAllSublevels = true;21 membersRequest.IncludeParentMembers = true;

Full Screen

Full Screen

MembersDiscoveryRequest

Using AI Code Generation

copy

Full Screen

1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using System.Threading.Tasks;6using NBi.Core.Analysis.Request;7{8 {9 static void Main(string[] args)10 {11 MembersDiscoveryRequest myMembersDiscoveryRequest = new MembersDiscoveryRequest();12 myMembersDiscoveryRequest.Cube = "Adventure Works";13 myMembersDiscoveryRequest.Dimension = "Customer";14 MembersCollection myMembersCollection = myMembersDiscoveryRequest.GetMembers();15 foreach (Member myMember in myMembersCollection)16 {17 Console.WriteLine(myMember.Caption);18 }19 Console.ReadLine();20 }21 }22}23using System;24using System.Collections.Generic;25using System.Linq;26using System.Text;27using System.Threading.Tasks;28using NBi.Core.Analysis.Request;29{30 {31 static void Main(string[] args)32 {33 MembersDiscoveryRequest myMembersDiscoveryRequest = new MembersDiscoveryRequest();34 myMembersDiscoveryRequest.Cube = "Adventure Works";35 myMembersDiscoveryRequest.Dimension = "Customer";36 myMembersDiscoveryRequest.Hierarchy = "Customer Geography";37 MembersCollection myMembersCollection = myMembersDiscoveryRequest.GetMembers();38 foreach (Member myMember in myMembersCollection)39 {40 Console.WriteLine(myMember.Caption);41 }42 Console.ReadLine();43 }44 }45}46using System;47using System.Collections.Generic;48using System.Linq;49using System.Text;50using System.Threading.Tasks;51using NBi.Core.Analysis.Request;52{53 {54 static void Main(string[] args)55 {

Full Screen

Full Screen

MembersDiscoveryRequest

Using AI Code Generation

copy

Full Screen

1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using NBi.Core.Analysis.Request;6using NBi.Core.Analysis.Member;7using NBi.Core.Analysis.Metadata;8{9 {10 static void Main(string[] args)11 {12 var membersDiscoveryRequest = new MembersDiscoveryRequest();13 membersDiscoveryRequest.ConnectionString = "Provider=msolap;Data Source=server;Initial Catalog=AdventureWorksDW2012;";14 membersDiscoveryRequest.CubeName = "Adventure Works DW 2012";15 membersDiscoveryRequest.Dimension = "Customer";16 membersDiscoveryRequest.Hierarchy = "Customer Geography";17 membersDiscoveryRequest.Level = "Country";18 membersDiscoveryRequest.Members = new List<IMember> { new Member("All Customers") };19 membersDiscoveryRequest.Metadata = new List<MetadataType> { MetadataType.Caption };20 var members = membersDiscoveryRequest.Execute();21 foreach (var member in members)22 Console.WriteLine(member.Caption);23 }24 }25}26OLAP Services (Analysis Services)27OLAP Services (Analysis Services) Reference28OLAP Services (Analysis Services) Samples

Full Screen

Full Screen

MembersDiscoveryRequest

Using AI Code Generation

copy

Full Screen

1using NBi.Core.Analysis.Request;2using NBi.Core.Analysis.Member;3using System;4using System.Collections.Generic;5using System.Linq;6using System.Text;7using System.Threading.Tasks;8using System.Data;9using NBi.Core.Analysis.Metadata.Adomd;10using NBi.Core.Analysis.Metadata;11{12 {13 public MembersDiscoveryRequest()14 {15 }16 public MembersDiscoveryRequest(string caption)17 {18 Caption = caption;19 }20 public string Caption { get; }21 public Hierarchy Hierarchy { get; set; }22 public Level Level { get; set; }23 public IEnumerable<Member> Members { get; set; }24 public IEnumerable<Member> ExcludedMembers { get; set; }25 public IEnumerable<Member> IncludedMembers { get; set; }26 public IEnumerable<string> FilteredMembers { get; set; }27 public IEnumerable<string> FilteredExcludedMembers { get; set; }28 public IEnumerable<string> FilteredIncludedMembers { get; set; }29 public IEnumerable<Member> Parents { get; set; }30 public IEnumerable<Member> Ancestors { get; set; }31 public IEnumerable<Member> Descendants { get; set; }32 public IEnumerable<Member> Children { get; set; }33 }34}35using NBi.Core.Analysis.Request;36using NBi.Core.Analysis.Member;37using System;38using System.Collections.Generic;39using System.Linq;40using System.Text;41using System.Threading.Tasks;42using System.Data;43using NBi.Core.Analysis.Metadata.Adomd;44using NBi.Core.Analysis.Metadata;45{46 {47 public MembersDiscoveryRequest()48 {49 }50 public MembersDiscoveryRequest(string caption)51 {52 Caption = caption;53 }54 public string Caption { get; }55 public Hierarchy Hierarchy { get; set; }56 public Level Level { get; set; }57 public IEnumerable<Member> Members { get; set; }58 public IEnumerable<Member> ExcludedMembers { get; set; }59 public IEnumerable<Member> IncludedMembers { get; set; }60 public IEnumerable<string> FilteredMembers { get; set; }

Full Screen

Full Screen

MembersDiscoveryRequest

Using AI Code Generation

copy

Full Screen

1using System;2using NBi.Core.Analysis.Request;3using NBi.Core.Analysis.Member;4using NBi.Core.Analysis.Metadata;5using NBi.Core.Analysis.Metadata.Adomd;6using System.Collections.Generic;7using System.Linq;8using System.Text;9using System.Threading.Tasks;10{11 {12 static void Main(string[] args)13 {14 var request = new MembersDiscoveryRequest();15 request.HierarchyUniqueName = "[Measures]";16 request.LevelUniqueName = "[Measures].[MeasuresLevel]";17 request.MemberUniqueName = "[Measures].[MeasuresLevel].[Measures]";18 request.MemberType = MemberType.Measure;19 request.MemberCaption = "Measures";20 request.MemberName = "Measures";21 request.MemberDescription = "Measures";22 var metadata = new AdomdMetadataDiscoveryCommand("Provider=MSOLAP.4;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Adventure Works DW Standard Edition;Data Source=localhost", "Adventure Works DW Standard Edition");23 var members = metadata.Execute(request);24 foreach (var member in members)25 {26 Console.WriteLine(member.UniqueName);27 }28 Console.ReadLine();29 }30 }31}

Full Screen

Full Screen

MembersDiscoveryRequest

Using AI Code Generation

copy

Full Screen

1using NBi.Core.Analysis.Request;2using NBi.Core.Query;3using NBi.Core.Query.Resolver;4using NBi.Core.Query.Resolver.Csv;5using NBi.Core.Query.Resolver.File;6using NBi.Core.Query.Resolver.Folder;7using NBi.Core.Query.Resolver.ODBC;8using NBi.Core.Query.Resolver.Providers;9using NBi.Core.Query.Resolver.SQLite;10using NBi.Core.Query.Resolver.SqlServer;11using NBi.Core.Query.Resolver.Xml;

Full Screen

Full Screen

MembersDiscoveryRequest

Using AI Code Generation

copy

Full Screen

1using System;2using System.Collections.Generic;3using System.Linq;4using System.Text;5using NBi.Core.Analysis.Request;6using NBi.Core.Analysis.Member;7using NBi.Core.Analysis.Metadata;8using NBi.Core.Analysis.Metadata.Adomd;9{10 {11 static void Main(string[] args)12 {13 string connectionString = "Provider=MSOLAP;Data Source=server;Initial Catalog=database;Integrated Security=SSPI";14 string dimensionName = "dimension";15 string hierarchyName = "hierarchy";16 string levelName = "level";17 string memberName = "member";18 string memberValue = "member value";19 {20 };21 var factory = new AdomdMetadataDiscoveryFactory();22 var members = factory.GetMembers(request);23 foreach(var member in members)24 Console.WriteLine(member.Caption);25 Console.ReadLine();26 }27 }28}29using System;30using System.Collections.Generic;31using System.Linq;32using System.Text;33using NBi.Core.Analysis.Request;34using NBi.Core.Analysis.Member;35using NBi.Core.Analysis.Metadata;36using NBi.Core.Analysis.Metadata.Adomd;37{38 {39 static void Main(string[] args)40 {41 string connectionString = "Provider=MSOLAP;Data Source=server;Initial Catalog=database;Integrated Security=SSPI";42 string dimensionName = "dimension";43 string hierarchyName = "hierarchy";44 string levelName = "level";45 string memberName = "member";46 string memberValue = "member value";47 {48 };49 var factory = new AdomdMetadataDiscoveryFactory();

Full Screen

Full Screen

MembersDiscoveryRequest

Using AI Code Generation

copy

Full Screen

1using NBi.Core.Analysis.Request;2using NBi.Core.Analysis.Member;3using NBi.Core.Analysis.Metadata;4using NBi.Core.Calculation;5using NBi.Core.Calculation.Predicate;6using NBi.Core.Calculation.Predicate.Text;7using NBi.Core.Query;8using NBi.Core.Query.Resolver;9using NBi.Core.Query.Command;10using NBi.Core.Query.Execution;11using NBi.Core.ResultSet;12using NBi.Core.ResultSet.Analyzer;13using NBi.Core.ResultSet.Resolver;14using NBi.Core.Scalar.Resolver;15using NBi.Core.Scalar.Casting;16using NBi.Core;17using NBi.Core.Variable;18using NBi.Core.Assemblies;19using NBi.Core.Csv;20using NBi.Core.ResultSet.Lookup.Violation;21using NBi.Core.ResultSet.Lookup;22using NBi.Core.ResultSet.Equivalence;23using NBi.Core.ResultSet.Comparer;24using NBi.Core.Transformation;25using NBi.Core.Transformation.Transformer.Native;26using NBi.Core.Transformation.Transformer.Native;27using NBi.Core.Transformation.Transformer.Native;28using NBi.Core.Transformation.Transformer.Native;29using System.Data;30using System.Data.OleDb;31using System.Data.SqlClient;32using System.Linq;33using System.Collections.Generic;34using System;35using NBi.Core.Analysis.Member;36using NBi.Core.Analysis.Metadata;37using NBi.Core.Analysis.Request;38using NBi.Core.Query;39using NBi.Core.Query.Resolver;40using NBi.Core.Query.Command;41using NBi.Core.Query.Execution;42using NBi.Core.ResultSet;43using NBi.Core.ResultSet.Analyzer;44using NBi.Core.ResultSet.Resolver;45using NBi.Core.Scalar.Resolver;46using NBi.Core.Scalar.Casting;47using NBi.Core;48using NBi.Core.Variable;49using NBi.Core.Assemblies;50using NBi.Core.Csv;51using NBi.Core.ResultSet.Lookup.Violation;52using NBi.Core.ResultSet.Lookup;53using NBi.Core.ResultSet.Equivalence;54using NBi.Core.ResultSet.Comparer;55using NBi.Core.Transformation;56using NBi.Core.Transformation.Transformer.Native;57using NBi.Core.Transformation.Transformer.Native;58using NBi.Core.Transformation.Transformer.Native;59using NBi.Core.Transformation.Transformer.Native;60using System.Data;61using System.Data.OleDb;62using System.Data.SqlClient;63using System.Linq;64using System.Collections.Generic;65using System;

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run NBi automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in MembersDiscoveryRequest

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful