コード例 #1
0
 /// <summary>
 /// Run analysis an all data.
 /// Data will be grouped by specified dimensions.
 /// Aggregation will be run on specified facts.
 /// Data will be returned in specified order.
 /// </summary>
 /// <param name="query">cube query</param>
 /// <param name="dimensions">dimension subset</param>
 /// <param name="facts">fact subset</param>
 /// <param name="order">custom order</param>
 /// <param name="limit">maximum number of row</param>
 /// <param name="offset">how many initial rows to skip</param>
 /// <returns>result from created query</returns>
 public static DataTable Analyze <T>(
     this IOlapCubeQuery <T> query,
     IEnumerable <string> dimensions,
     IEnumerable <string> facts,
     IEnumerable <KeyValuePair <string, bool> > order,
     int?limit,
     int?offset) where T : IDataSource
 {
     return(query.Analyze(dimensions, facts, order, null, limit, offset));
 }
コード例 #2
0
 /// <summary>
 /// Run analysis an all data.
 /// Data will be grouped by specified dimensions.
 /// Aggregation will be run on specified facts.
 /// Data will be returned in specified order.
 /// </summary>
 /// <param name="query">cube query</param>
 /// <param name="dimensions">dimension subset</param>
 /// <param name="facts">fact subset</param>
 /// <param name="order">custom order</param>
 /// <param name="limit">maximum number of row</param>
 /// <param name="offset">how many initial rows to skip</param>
 /// <returns>result from created query</returns>
 public static DataTable Analyze(
     this IOlapCubeQuery query,
     IEnumerable <string> dimensions,
     IEnumerable <string> facts,
     IEnumerable <KeyValuePair <string, bool> > order,
     int?limit,
     int?offset)
 {
     return(query.Analyze <object>(dimensions, facts, order, null, limit, offset));
 }
コード例 #3
0
            public DataTable Analyze <TFormat>(
                ISerialization <TFormat> serializer,
                IServiceLocator locator,
                IOlapCubeQuery query,
                IEnumerable <string> dimensions,
                IEnumerable <string> facts,
                IDictionary <string, bool> order,
                int?limit,
                int?offset,
                TFormat data)
            {
                dynamic specification;

                if (data == null)
                {
                    try
                    {
                        specification = Activator.CreateInstance(typeof(TSpecification));
                    }
                    catch (Exception ex)
                    {
                        throw new ArgumentException("Specification can't be created. It must be sent as argument.", ex);
                    }
                }
                else
                {
                    try
                    {
                        specification = serializer.Deserialize <TFormat, TSpecification>(data, locator);
                    }
                    catch (Exception ex)
                    {
                        throw new ArgumentException("Specification could not be deserialized.", ex);
                    }
                }
                if (specification == null)
                {
                    throw new FrameworkException("Specification could not be deserialized.");
                }
                return(query.Analyze(dimensions, facts, order, specification, limit, offset));
            }
コード例 #4
0
 /// <summary>
 /// Load query data by running analysis on all data.
 /// </summary>
 /// <returns>aggregated information</returns>
 public DataTable Analyze()
 {
     return(Query.Analyze(Dimensions, Facts, Order, ResultLimit, ResultOffset));
 }