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());
     }
 }
Example #2
0
        public MemberCollection GetMembers(long start, long count, string[] properties) //, params MemberFilter[] filters)
        {
            if (_obj != null)
            {
                MemberCollection coll = new MemberCollection();
                foreach (Microsoft.AnalysisServices.AdomdClient.Member member in _obj.GetMembers(start, count, properties))
                {
                    coll.Add(new Member(member));
                }
                return(coll);
            }

            MemberCollection f()
            {
                MemberCollection coll = new MemberCollection();

                foreach (ExcelAdomdClientReference::Microsoft.AnalysisServices.AdomdClient.Member member in _objExcel.GetMembers(start, count, properties))
                {
                    coll.Add(new Member(member));
                }
                return(coll);
            }

            return(f());
        }
        // Конструктор, создающий объект на основе полученного с сервера объекта Level
        public Level(Microsoft.AnalysisServices.AdomdClient.Level serverLevel)
        {
            Name           = serverLevel.Name;
            MemberCount    = serverLevel.MemberCount;
            MemberNameList = new List <string>();
            int memberIndex = 0;

            foreach (Member member in serverLevel.GetMembers())
            {
                memberIndex++;
                MemberNameList.Add(member.Name);
                if (memberIndex > 100)
                {
                    break;
                }
            }
        }