コード例 #1
0
        protected BatchAccessor(IObservableGroup observableGroup, IComponentDatabase componentDatabase, IBatchBuilder batchBuilder, IComponentTypeLookup componentTypeLookup)
        {
            ObservableGroup     = observableGroup;
            ComponentDatabase   = componentDatabase;
            BatchBuilder        = batchBuilder;
            ComponentTypeLookup = componentTypeLookup;

            SetupAccessor();
        }
コード例 #2
0
        public void BuildBatch(IBatchBuilder batchBuilder, string filePath)
        {
            using (StreamReader reader = new StreamReader(filePath))
            {
                string         line           = null;
                PaymentRequest paymentRequest = null;

                while ((line = reader.ReadLine()) != null)
                {
                    var lineValues      = line.Split('^');
                    var currentLineType = lineValues[0];

                    switch (currentLineType)
                    {
                    case "B":
                        batchBuilder.AddHeader(lineValues);
                        break;

                    case "H":
                        paymentRequest = batchBuilder.CreatePaymentRequest();
                        paymentRequest.AddHeader(lineValues);
                        batchBuilder.AddPaymentRequest(paymentRequest);
                        break;

                    case "L":
                        InvoiceLine invoiceLine = batchBuilder.CreateInvoiceLine();
                        invoiceLine.AddValues(lineValues);
                        paymentRequest.AddInvoiceLine(invoiceLine);
                        break;

                    default:
                        break;
                    }
                }
            }
        }
コード例 #3
0
ファイル: BatchedSystem.cs プロジェクト: tuita520/ecsrx
 protected BatchedSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup,
                         IBatchBuilderFactory batchBuilderFactory, IThreadHandler threadHandler) : base(componentDatabase,
                                                                                                        componentTypeLookup, threadHandler)
 {
     _batchBuilder = batchBuilderFactory.Create <T1, T2>();
 }
コード例 #4
0
 public ReferenceBatchAccessor(IObservableGroup observableGroup, IComponentDatabase componentDatabase, IBatchBuilder batchBuilder, IComponentTypeLookup componentTypeLookup) : base(observableGroup, componentDatabase, batchBuilder, componentTypeLookup)
 {
 }