Bari.Core.Model.Loader.LocalYamlModelLoader.Supports C# (CSharp) Method

Supports() public method

Returns true if the loader can load suite model from the given source
public Supports ( string source ) : bool
source string Source, can mean anything (file names, urls, markup, etc.)
return bool
        public bool Supports(string source)
        {
            if (File.Exists(source))
            {
                using (var reader = File.OpenText(source))
                {
                    string firstLine = reader.ReadLine();
                    return firstLine != null && firstLine.StartsWith("---");
                }
            }

            return false;
        }