Exemple #1
0
        public static void Update(string name, string content)
        {
            InMemoryFileStore.UpdateByName(name, content);

            // Update the new rules content (in-memory)
            if (String.Compare(name, "DiscountDecision.xml", StringComparison.OrdinalIgnoreCase) == 0)
            {
                BuildDiscountDecision();
            }
        }
Exemple #2
0
 private static void BuildDiscountDecision()
 {
     DiscountDecision = RuntimeEngine.FromXml(InMemoryFileStore.GetByName("DiscountDecision.xml").AsBytes());
     // Capture events
     DiscountDecision.Events = EventNames.All;
     // registering custom function
     DiscountDecision.RegisterFunction(typeof(AgeExtensions));
     // build validation plan for executing decision table
     // Creates a reader to access an excel file
     DiscountDecision.Entries.Add("Y", "true", true);
     DiscountDecision.Entries.Add("N", "false", true);
 }
Exemple #3
0
 public static string Read(string name)
 {
     return(InMemoryFileStore.GetByName(name));
 }
Exemple #4
0
 private static void BuildValidator()
 {
     InputValidator = RuntimeEngine.FromXml(InMemoryFileStore.GetByName("inputValidator.xml").AsBytes());
 }