コード例 #1
0
        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                result.Value = Path.GetExtension(fileName).Substring(1).ToLower();
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return(result);
        }
コード例 #2
0
        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                result.Value = ExifUtilities.GetProperty(fileName, ExifProperties.CameraModel);
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return(result);
        }
コード例 #3
0
        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                result.Value = File.GetCreationTime(fileName).ToString(options.DateFormatString);
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return(result);
        }
コード例 #4
0
        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                var tags = Id3Utilities.GetTags(fileName);
                result.Value = tags.JoinedAlbumArtists;
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return(result);
        }
コード例 #5
0
        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                string date      = ExifUtilities.GetProperty(fileName, ExifProperties.DateTaken);
                var    dateTaken = DateTime.ParseExact(date, "yyyy:MM:dd HH:mm:ss", null);
                result.Value = dateTaken.ToString(options.DateFormatString);
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return(result);
        }