Esempio n. 1
0
        public static Context InitContext(UnderwritingInput input)
        {
            Context ctx = new Context();

            if (input.PropertyInfo != null)
            {
                ctx.PropertyInfo = input.PropertyInfo;
            }
            if (input.DealCosts != null)
            {
                ctx.DealCosts = input.DealCosts;
            }
            if (input.LienInfo != null)
            {
                ctx.LienInfo = input.LienInfo;
            }
            if (input.RehabInfo != null)
            {
                ctx.RehabInfo = input.RehabInfo;
            }
            if (input.RentalInfo != null)
            {
                ctx.RentalInfo = input.RentalInfo;
            }
            if (input.LienCosts != null)
            {
                ctx.LienCosts = input.LienCosts;
            }
            return(ctx);
        }
Esempio n. 2
0
        public static Context DebugRule(UnderwritingInput input)
        {
            var ctx = Context.InitContext(input);
            UnderwritingService service = GetService();

            service.CalculateValues(ctx).CalculateSums(ctx).CalculateInsurancePremium(ctx)
            .CalculateHOI(ctx).CalculateCashScenario(ctx)
            .CalculateLoanScenario(ctx).CalculateFlipScenario(ctx)
            .CalculateSummary(ctx).CalculateMinimumBaselineScenario(ctx)
            .CalculateBestCaseScenario(ctx).CalculateRentalModel(ctx);
            return(ctx);
        }
 public UnderwritingOutput PostSingleJob([FromBody] UnderwritingInput input)
 {
     return(UnderwritingService.Services.UnderwritingService.ApplyRule(input));
 }
Esempio n. 4
0
 public Context DebugRule(UnderwritingInput input)
 {
     return(UnderwritingService.Services.UnderwritingService.DebugRule(input));
 }