コード例 #1
0
 public static FixtureModel ReadFrom(string text)
 {
     using (var reader = new FixtureReader(new StringReader(text)))
     {
         return(reader.Read());
     }
 }
コード例 #2
0
        public static FixtureModel ReadFromFile(string file)
        {
            using (var stream = new FileStream(file, FileMode.Open))
            {
                using (var streamReader = new StreamReader(stream))
                {
                    using (var reader = new FixtureReader(streamReader))
                    {
                        var fixture = reader.Read();
                        fixture.key = Path.GetFileNameWithoutExtension(file);

                        return(fixture);
                    }
                }
            }
        }