示例#1
0
 public TraceElement(int iterationNumber, TraceElementTypeEnum type, Rule rule, List <char> facts) : this()
 {
     IterationNumber = iterationNumber;
     Type            = type;
     Rule            = rule;
     Facts.AddRange(facts);
 }
示例#2
0
 public TraceElement(char newFact, List <char> facts, char goal) : this()
 {
     Type = TraceElementTypeEnum.NewFact;
     Fact = newFact;
     Facts.AddRange(facts);
     Goal = goal;
 }
示例#3
0
 public void AddFact(string line)
 {
     if (_countRule == 0)
     {
         throw new Exception("Rules not found before facts");
     }
     line = line.Replace("=", "");
     Facts.AddRange(line);
     _countFact++;
 }
示例#4
0
        public void EnsureSeedForContext()
        {
            Facts.RemoveRange(Facts);
            Submissions.RemoveRange(Submissions);
            SaveChanges();

            Database.ExecuteSqlCommand("DBCC CHECKIDENT('Facts', RESEED, 0)");
            Database.ExecuteSqlCommand("DBCC CHECKIDENT('Submissions', RESEED, 0)");

            var facts = new List <Fact>
            {
                new Fact {
                    Description = "Chuck Norris mined all bitcoins...twice"
                },
                new Fact {
                    Description = "The Great Wall of China was originally created to keep Chuck Norris out. It failed miserably."
                },
                new Fact {
                    Description = "Chuck Norris beat the sun in a staring contest"
                },
                new Fact {
                    Description = "Chuck Norris narrates Morgan Freeman's life"
                },
                new Fact {
                    Description = "When chuck Norris does division, there are no remainders"
                },
                new Fact {
                    Description = "There are two types of people in the world... people that suck, and Chuck Norris"
                },
                new Fact {
                    Description = "If at first you don't succeed, you're not Chuck Norris."
                }
            };

            Facts.AddRange(facts);
            SaveChanges();
        }
示例#5
0
文件: Runner.cs 项目: trystan/theseus
 public void AddFactsFrom <S>()
 {
     Facts.AddRange(FactFinder.FindFacts <T>(typeof(S)));
 }
示例#6
0
文件: Runner.cs 项目: trystan/theseus
 public void AddFactsFrom(Assembly assembly)
 {
     Facts.AddRange(FactFinder.FindFacts <T>(assembly));
 }