Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        public static IEnumerable <Issue> Validate(IWorkspaceItem item)
        {
            var text = Encoding.UTF8.GetString(item.Read());

            return(MarkdownValidator.Validate(text, item));
        }