Exemple #1
0
        }         // CheckAvailableFunds

        private void ProcessRow(SafeReader sr)
        {
            RowType nRowType;

            string sRowType = sr["RowType"];

            if (!Enum.TryParse(sRowType, out nRowType))
            {
                Log.Alert("Unsupported row type encountered: '{0}'.", sRowType);
                return;
            }             // if

            switch (nRowType)
            {
            case RowType.MetaData:
                sr.Fill(MetaData);
                break;

            case RowType.LatePayment:
                LatePayments.Add(sr.Fill <Payment>());
                break;

            case RowType.Marketplace:
                NewMarketplaces.Add(sr.Fill <Marketplace>());
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }     // switch
        }         // ProcessRow
Exemple #2
0
        }         // CheckLatePayments

        private void CheckNewMarketplaces()
        {
            if (NewMarketplaces.Count < 1)
            {
                StepDone <NewMarketplace>().Init(null);
            }
            else
            {
                StepFailed <NewMarketplace>().Init(NewMarketplaces.Select(x => string.Format("a marketplace {1}({2} - {3}) on {0}",
                                                                                             x.AddTime, x.Name, x.ID, x.Type)).Aggregate((a, b) => a + ", " + b));
            }     // if
        }         // CheckNewMarketplaces