Example #1
0
        public virtual AdomdDiscoveryCommand BuildInternal(MetadataDiscoveryRequest request)
        {
            AdomdDiscoveryCommand cmd = null;

            cmd         = BuildBase(request.Target, request.ConnectionString);
            cmd.Filters = request.GetAllFilters().Where(f => f.Target == request.Target);

            return(cmd);
        }
Example #2
0
        public virtual AdomdDiscoveryCommand BuildLinkedTo(MetadataDiscoveryRequest request)
        {
            AdomdDiscoveryCommand cmd = null;

            switch (request.Target)
            {
            case DiscoveryTarget.MeasureGroups:
                cmd = new DimensionLinkedToDiscoveryCommand(request.ConnectionString);
                break;

            case DiscoveryTarget.Dimensions:
                cmd = new MeasureGroupLinkedToDiscoveryCommand(request.ConnectionString);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
            cmd.Filters = request.GetAllFilters();

            return(cmd);
        }