示例#1
0
        private ISsrsObjectSource GetObjectSource()
        {
            if (!SourcePaths.Any())
            {
                throw new InvalidArgumentsException("No source paths specified.");
            }

            var sourceFactory = new ObjectSourceFactory()
            {
                ReportingServiceClientFactory = ReportingServiceClientFactory, BasePath = BasePath
            };
            var aggregateSource = new AggregatedObjectSource();

            try
            {
                foreach (var path in SourcePaths)
                {
                    aggregateSource.Add(sourceFactory.Create(path));
                }
                return(aggregateSource);
            }
            catch
            {
                aggregateSource.Dispose();
                throw;
            }
        }
示例#2
0
        private ISsrsObjectSource GetObjectSource()
        {
            if (!ArgumentList.Any())
            {
                throw new InvalidArgumentsException("No object source specified.");
            }

            var sourceFactory = new ObjectSourceFactory()
            {
                ReportingServiceClientFactory = ReportingServiceClientFactory, BasePath = BasePath
            };

            return(sourceFactory.Create(ArgumentList));
        }