Exemple #1
0
        //returns true if factor documentation is up to date
        private static bool CheckOrUpdate(string path)
        {
            string tempFile = Path.GetTempFileName();

            FactorDocumentationWriter.WriteFactorDocumentation(tempFile);
            var  generated = File.ReadAllText(tempFile);
            var  current   = File.ReadAllText(path);
            bool flag      = generated.Equals(current);

            if (!flag)
            {
                using (var writer = new StreamWriter(path, false, Encoding.UTF8))
                {
                    writer.Write(generated);
                }
            }

            File.Delete(tempFile);

            return(flag);
        }
Exemple #2
0
 public static void WriteFactorDocumentation()
 {
     //TODO: change path for cross platform using
     FactorDocumentationWriter.WriteFactorDocumentation(@"..\..\..\Runtime\Factors\FactorDocs.xml");
 }