public void FileAsUriPath(string file, ReturnFormat format) { SimpleUriHandler handler = new SimpleUriHandler(); string uri = $"file://" + Path.Combine(Environment.CurrentDirectory, file); SimpleUriHandlerParameters parms = new SimpleUriHandlerParameters() { Uri = uri, Format = format }; string result = handler.GetFileUri(parms.ParsedUri.ToString()); object o = handler.FormatData(result, parms.Format); }
public void FileAsUncPath(string file, ReturnFormat format) { SimpleUriHandler handler = new SimpleUriHandler(); string uri = $@"\\{Environment.MachineName}\" + Path.Combine(Environment.CurrentDirectory, file).ToLower().Replace("c:", "c$"); SimpleUriHandlerParameters parms = new SimpleUriHandlerParameters() { Uri = uri, Format = format }; string result = handler.GetFileUri(parms.ParsedUri.ToString()); object o = handler.FormatData(result, parms.Format); }