Beispiel #1
0
        static void Main(string[] args)
        {
            var collection = new AggregateCollection();

            collection[0] = "item A";
            collection[1] = "item B";
            collection[2] = "item C";

            Console.WriteLine($"Quantidade de itens = {collection.Count()}");


            collection.Add("item D");
            collection.Add("item E");
            collection.Add("item F");

            Console.WriteLine($"Quantidade de itens = {collection.Count()}");

            var iterator = collection.CreateIterator();

            var item = iterator.First();

            while (item != null)
            {
                Console.WriteLine(item);
                item = iterator.Next();
            }


            Console.ReadKey();
        }
 public AggregateFuctionHelper()
 {
     this.agCol = new AggregateCollection();
     this.agCol.Add(new Aggregate("Value1", 1, 1.5));
     this.agCol.Add(new Aggregate("Value2", 2, 2.5));
     this.agCol.Add(new Aggregate("Value3", 3, 3.5));
     this.agCol.Add(new Aggregate("Value400", 400, 400.5));
 }
        private Grouping(ICondition filter, params GroupKey[] keys)
        {
            if (keys == null || keys.Length == 0)
            {
                throw new ArgumentNullException(nameof(keys));
            }

            _keys       = keys;
            _filter     = filter;
            _aggregates = new AggregateCollection(this);
        }
		public void CreateExportlist() {
			collection = new Collection<ExportText>();
			collection.Add(new ExportText()
			               {
			               	Text = String.Empty
			               });
			
			helper = new AggregateFuctionHelper();
			aggregateCollection = helper.AggregateCollection;
			dataSource = new CollectionDataSource(aggregateCollection,new ReportSettings());
			dataSource.Bind();
			visitor = new ExpressionVisitor(new ReportSettings());
			visitor.SetCurrentDataSource(dataSource.SortedList);
		}
        public void CreateExportlist()
        {
            collection = new Collection <ExportText>();
            collection.Add(new ExportText()
            {
                Text = String.Empty
            });

            helper = new AggregateFuctionHelper();
            aggregateCollection = helper.AggregateCollection;
            dataSource          = new CollectionDataSource(aggregateCollection, new ReportSettings());
            dataSource.Bind();
            visitor = new ExpressionVisitor(new ReportSettings());
            visitor.SetCurrentDataSource(dataSource.SortedList);
        }
        public void Init()
        {
            this.singlePage = TestHelper.CreateSinglePage();
            this.evaluator  = new ExpressionEvaluatorFacade(this.singlePage);


            AggregateFuctionHelper ah = new AggregateFuctionHelper();

            this.aggregateCollection = ah.AggregateCollection;

            foreach (Aggregate r in this.aggregateCollection)
            {
                this.intResult    = this.intResult + r.IntValue;
                this.doubleResult = this.doubleResult + r.Amount;
            }

            this.dataManager = ICSharpCode.Reports.Core.DataManager.CreateInstance(this.aggregateCollection, new ReportSettings());
            this.singlePage.IDataNavigator = this.dataManager.GetNavigator;
        }
Beispiel #7
0
		public DataContext(MetadataContext metadataContext)
		{
			_metadataContext = metadataContext;

			_tables = new TableCollection(this);
			_tables.Changed += member_Changed;

			_tableRelations = new TableRelationCollection(this);
			_tableRelations.Changed += member_Changed;

			_constants = new ConstantCollection();
			_constants.Changed += member_Changed;

			_aggregates = new AggregateCollection();
			_aggregates.AddDefaults();
			_aggregates.Changed += member_Changed;

			_functions = new FunctionCollection();
			_functions.AddDefaults();
			_functions.Changed += member_Changed;			
		}
		public void Init()
		{
			
			this.singlePage = TestHelper.CreateSinglePage();
			this.evaluator = new ExpressionEvaluatorFacade(this.singlePage);

			
			AggregateFuctionHelper ah = new AggregateFuctionHelper();
			this.aggregateCollection = ah.AggregateCollection;
			
			foreach (Aggregate r in this.aggregateCollection)
			{
				this.intResult = this.intResult + r.IntValue;
				this.doubleResult = this.doubleResult + r.Amount;
			}
			
			this.dataManager = ICSharpCode.Reports.Core.DataManager.CreateInstance(this.aggregateCollection, new ReportSettings());
			this.singlePage.IDataNavigator = this.dataManager.GetNavigator;
		}
 public IteratorCollection(AggregateCollection aggregate)
 {
     _aggregate = aggregate;
 }
Beispiel #10
0
 public Task <List <Rule> > GetActiveRules()
 {
     return(AggregateCollection.Find(a => a.IsActive == true).ToListAsync());
 }
Beispiel #11
0
 public Task <Rule> Get(int id)
 {
     return(AggregateCollection.Find(a => a.Id == id).FirstOrDefaultAsync());
 }
Beispiel #12
0
 public Task Add(Rule rule)
 {
     return(AggregateCollection.InsertOneAsync(rule));
 }