public static MultipartFormParameter CreateFile(IWorkspaceItem item) { var bytes = item.Read(); if (preprocessors.TryGetValue(item.FileInfo.Extension, out var preprocessor)) { bytes = preprocessor.Preprocess(item, bytes); } return(CreateFile(item.RelativeName, item.FullName, bytes)); }
public static IEnumerable <Issue> Validate(IWorkspaceItem item) { var text = Encoding.UTF8.GetString(item.Read()); return(MarkdownValidator.Validate(text, item)); }