Пример #1
0
 public static AppException FileDoesNotExist(FilePath path, [Caller] string caller = null, [File] string file = null, [Line] int?line = null)
 => AppException.Define(ErrorMessages.FileDoesNotExist(path, caller, file, line));
Пример #2
0
 /// <summary>
 /// Attempts to parse a text document and returns the result if successful
 /// </summary>
 /// <param name="src">The source document path</param>
 /// <param name="format">The document format</param>
 /// <param name="observer">An optional observer to witness intersting events</param>
 public static Option <TextDoc> ParseDocument(this FilePath src, TextFormat?format = null, Action <AppMsg> observer = null)
 {
     if (!src.Exists())
     {
         observer?.Invoke(ErrorMessages.FileDoesNotExist(src));
         return(default);