public static YamlStream Load(string file)
 {
     string text = File.ReadAllText(file);
     TextInput input = new TextInput(text);
     YamlParser parser = new YamlParser();
     bool success;
     YamlStream stream = parser.ParseYamlStream(input, out success);
     if (success)
     {
         return stream;
     }
     else
     {
         string message = parser.GetEorrorMessages();
         throw new Exception(message);
     }
 }