Esempio n. 1
0
        public ReportCreator(
            IBrokerParserProviderFactory brokerParserProviderFactory,
            IDataTransformerFactory dataTransformerFactory,

            IEntityConvertor <Trade> tradeConvertor,
            IEntityConvertor <ForexTrade> forexTradeConvertor,

            IEntityExtrator <FinInstrument> finInstrumentsExtrator,
            IEntityExtrator <AccountInformation> accountInformationExtrator,

            IEntityExtrator <Deposit> depositsExtrator,
            IEntityExtrator <SecuritiesLentInterest, ConvertedSecuritiesLentInterest> securitiesLentExtrator,
            IEntityExtrator <Dividend, ConvertedDividend> dividendsEntityExtrator,
            IEntityExtrator <Interest, ConvertedInterest> interestEntityExtrator,
            IEntityExtrator <Fee, ConvertedFee> feeEntityExtrator
            )
        {
            this.brokerParserProviderFactory = brokerParserProviderFactory;
            this.dataTransformerFactory      = dataTransformerFactory;
            this.tradeConvertor             = tradeConvertor;
            this.forexTradeConvertor        = forexTradeConvertor;
            this.depositsExtrator           = depositsExtrator;
            this.finInstrumentsExtrator     = finInstrumentsExtrator;
            this.accountInformationExtrator = accountInformationExtrator;
            this.securitiesLentExtrator     = securitiesLentExtrator;
            this.dividendsEntityExtrator    = dividendsEntityExtrator;
            this.interestEntityExtrator     = interestEntityExtrator;
            this.feeEntityExtrator          = feeEntityExtrator;
        }
Esempio n. 2
0
 public TradesExtrator(
     ITaxReport taxReport,
     IBrokerParserProvider brokerParserProvider,
     IDataTransformer <Trade, ClosedOperation <Trade> > tradeTransformer,
     IEntityConvertor <Trade> tradeConvertor
     )
 {
     this.taxReport            = taxReport;
     this.brokerParserProvider = brokerParserProvider;
     this.tradeConvertor       = tradeConvertor;
     this.tradeTransformer     = tradeTransformer;
 }
Esempio n. 3
0
        public void EmitCreateTest()
        {
            IEntityConvertor <UserDto> convertor = EmitTest.GenerateEntityConvertor <UserDto>();
            //return;
            List <UserDto> users = new List <UserDto>();
            DataTable      dt    = Dbc.Db.GetDataTable("Select * from t_User");

            if (dt?.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    UserDto user = convertor.ConvertDto(dt.Rows[i]);
                    users.Add(user);
                }
            }
        }