Example #1
0
        public static DocumentBuilder Run()
        {
            string agreementTextJsonFile = CheckFile(
                Path.Combine("Content", "pa-agreement-text.json"));
            string agreementJsonFile = CheckFile(
                Path.Combine("Content", "pa-agreement.json"));
            string partiesJsonFile = CheckFile(
                Path.Combine("Content", "pa-parties.json"));

            string agreementTextJsonContent =
                File.ReadAllText(agreementTextJsonFile);
            string agreementJsonContent =
                File.ReadAllText(agreementJsonFile);
            string partiesJsonContent =
                File.ReadAllText(partiesJsonFile);

            List <AgreementText> agreementText =
                JsonConvert.DeserializeObject <List <AgreementText> >(agreementTextJsonContent);
            AgreementData agreement =
                JsonConvert.DeserializeObject <AgreementData>(agreementJsonContent);
            List <PartyData> partyData =
                JsonConvert.DeserializeObject <List <PartyData> >(partiesJsonContent);

            var paymentAgreementBuilder =
                new PaymentAgreementBuilder();

            paymentAgreementBuilder.AgreementText = agreementText;
            paymentAgreementBuilder.Agreement     = agreement;
            paymentAgreementBuilder.PartyData     = partyData;

            return(paymentAgreementBuilder.Build());
        }
 internal RentalAgreementAmountBuilder SetAgreement(
     AgreementData agreement)
 {
     this.agreement = agreement;
     return(this);
 }
 internal RentalAgreementCheckListBuilder SetAgreement(
     AgreementData agreement)
 {
     this.agreement = agreement;
     return(this);
 }