FileType.cs 487 B

123456789101112131415161718192021222324
  1. namespace TEAMModelOS.SDK
  2. {
  3. public class FileType
  4. {
  5. public string Id { get; set;}
  6. public string Extention { get; set; }
  7. public string Type { get; set; }
  8. public FileType(string id, string extention, string type)
  9. {
  10. Id = id;
  11. Extention = extention;
  12. Type = type;
  13. }
  14. public static string GetExtention(string fileName) {
  15. if (string.IsNullOrEmpty(fileName)) {
  16. return "";
  17. } else {
  18. return fileName.Substring(fileName.LastIndexOf(".") + 1);
  19. }
  20. }
  21. }
  22. }