Пример #1
0
        public virtual void InitCfg(DateTime dataAsOf, RejectionConfigs configs)
        {
            if (configs == null)
            {
                throw new ArgumentNullException("configs", "No configuration to copy from specified.");
            }

            DataAsOf = dataAsOf;

            AutoRejectionException_AnualTurnover         = configs.AutoRejectionException_AnualTurnover;
            AutoRejectionException_CreditScore           = configs.AutoRejectionException_CreditScore;
            RejectionExceptionMaxCompanyScore            = configs.RejectionExceptionMaxCompanyScore;
            RejectionExceptionMaxConsumerScoreForMpError = configs.RejectionExceptionMaxConsumerScoreForMpError;
            RejectionExceptionMaxCompanyScoreForMpError  = configs.RejectionExceptionMaxCompanyScoreForMpError;
            LowCreditScore                     = configs.LowCreditScore;
            RejectionCompanyScore              = configs.RejectionCompanyScore;
            Reject_Defaults_CreditScore        = configs.Reject_Defaults_CreditScore;
            Reject_Defaults_AccountsNum        = configs.Reject_Defaults_AccountsNum;
            Reject_Defaults_Amount             = configs.Reject_Defaults_Amount;
            Reject_Defaults_MonthsNum          = configs.Reject_Defaults_MonthsNum;
            Reject_Defaults_CompanyScore       = configs.Reject_Defaults_CompanyScore;
            Reject_Defaults_CompanyAccountsNum = configs.Reject_Defaults_CompanyAccountsNum;
            Reject_Defaults_CompanyMonthsNum   = configs.Reject_Defaults_CompanyMonthsNum;
            Reject_Defaults_CompanyAmount      = configs.Reject_Defaults_CompanyAmount;
            Reject_Minimal_Seniority           = configs.Reject_Minimal_Seniority;
            TotalAnnualTurnover                = configs.TotalAnnualTurnover;
            TotalThreeMonthTurnover            = configs.TotalThreeMonthTurnover;
            Reject_LateLastMonthsNum           = configs.Reject_LateLastMonthsNum;
            Reject_NumOfLateAccounts           = configs.Reject_NumOfLateAccounts;
            RejectionLastValidLate             = configs.RejectionLastValidLate;
            AutoRejectConsumerCheckAge         = configs.AutoRejectConsumerCheckAge;

            EnabledTraces.Clear();

            foreach (var s in configs.EnabledTraces)
            {
                EnabledTraces.Add(s);
            }
        }         // InitCfg
Пример #2
0
        }         // enum RowType

        private void SetValue(SafeReader sr)
        {
            RowType rt;

            if (!Enum.TryParse(sr["RowType"], out rt))
            {
                return;
            }

            switch (rt)
            {
            case RowType.Cfg:
                SetCfgValue(sr);
                break;

            case RowType.TraceEnabled:
                EnabledTraces.Add(sr["Name"]);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }     // switch
        }         // SetValue
Пример #3
0
		} // constructor

		public virtual bool IsTraceEnabled<T>() {
			return EnabledTraces.Contains(typeof(T).FullName);
		} // IsTraceEnabled