bool IsSuitableFileData( IClipboardData clipboardData) { var fileData = clipboardData as IClipboardFileData; return(fileData != null && fileTypeInterpreter.GetFileTypeFromFileName(fileData.FileName) == FileType.Image); }
public LinkType GetLinkType(string link) { var linkType = default(LinkType); if (fileTypeInterpreter.GetFileTypeFromFileName(link) == FileType.Image) { linkType |= LinkType.ImageFile; } if (link.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) { linkType |= LinkType.Https; } else if (link.StartsWith("http://", StringComparison.OrdinalIgnoreCase)) { linkType |= LinkType.Http; } return(linkType); }