private EvaluationResult EvaluateArbitrationClause(ArbitrationClause arbitrationClause) { List <string> badCountries = new List <string>() { "United Kingdom", "GB" }; List <GoverningLaw> badGoverningLaw = new List <GoverningLaw>() { GoverningLaw.British }; //hardcoded: var index = badCountries.IndexOf(arbitrationClause.PlaceOfArbirtration.Country); if (index > -1) { return(new EvaluationResult(false, $"{badCountries[index]} is bad as Place of arbitration")); } index = badGoverningLaw.IndexOf(arbitrationClause.GoverningLaw); if (index > -1) { return(new EvaluationResult(false, $"{badGoverningLaw[index]} is bad as Choice for governing law.")); } return(new EvaluationResult(true)); }
static void Main(string[] args) { var contract = new Contract(); contract.InterestedParty.Add(new Party("Party 1")); contract.InterestedParty.Add(new Party("Party 2")); var arbitraionClause = new ArbitrationClause(); arbitraionClause.GoverningLaw = GoverningLaw.French; arbitraionClause.PlaceOfArbirtration.Country = "Hungary"; arbitraionClause.PlaceOfArbirtration.City = "Budapest"; contract.Clauses.Add(arbitraionClause); var nonDisclosureClause = new NonDisclosureClause(); nonDisclosureClause.OnlyMarked = false; nonDisclosureClause.WhoIsBound.Add(contract.InterestedParty[0]); contract.Clauses.Add(nonDisclosureClause); var evaluator = new Evaluator(); var result = evaluator.Evaluate(contract, contract.InterestedParty[0]); foreach (var kvp in result) { Console.WriteLine($"{kvp.Key.GetType()}: {kvp.Value}"); } Console.ReadLine(); }