Exemple #1
0
        public virtual MetadataDiscoveryRequest BuildRelation(string connectionString, DiscoveryTarget target, IEnumerable <IFilter> filters)
        {
            //Validations
            Validate(
                new List <Validation>()
            {
                new ConnectionStringNotEmpty(connectionString),
                new PerspectiveNotNull(filters),
                new AtLeastOneNotNull(filters, DiscoveryTarget.Dimensions, DiscoveryTarget.MeasureGroups)
            }
                );

            //If validation of parameters is successfull then we build the object
            var disco = new MetadataLinkedToDiscoveryRequest(connectionString, target, filters);

            return(disco);
        }
        public virtual MetadataDiscoveryRequest BuildRelation(string connectionString, DiscoveryTarget target, IEnumerable<IFilter> filters)
        {
            //Validations
            Validate(
                new List<Validation>()
                {
                    new ConnectionStringNotEmpty(connectionString),
                    new PerspectiveNotNull(filters),
                    new AtLeastOneNotNull(filters, DiscoveryTarget.Dimensions, DiscoveryTarget.MeasureGroups)
                }
            );

            //If validation of parameters is successfull then we build the object
            var disco = new MetadataLinkedToDiscoveryRequest(connectionString, target, filters);
            return disco;
        }