public static string EncodedImage(string filePath, FileExtensionType extension)
        {
            try
            {
                switch (extension)
                {
                case FileExtensionType.Ico:
                    return(ImageEncoding.EncodeIco(filePath));

                case FileExtensionType.Gif:
                case FileExtensionType.Jpg:
                case FileExtensionType.Png:
                    return(ImageEncoding.EncodeImage(filePath, extension));

                case FileExtensionType.Svg:
                    return(ImageEncoding.EncodeSvg(filePath));

                default:
                    return(null);
                }
            }
            catch (Exception ex)
            {
                OutputLogger.WriteToOutputWindow(Resource.Error_ErrorEncodingImage, MessageType.Error);
                ExceptionHandler.LogException(Logger, Resource.Error_ErrorEncodingImage, ex);
                return(null);
            }
        }
        public static string EncodedImage(string filePath, FileExtensionType extension)
        {
            switch (extension)
            {
            case FileExtensionType.Ico:
                return(ImageEncoding.EncodeIco(filePath));

            case FileExtensionType.Gif:
            case FileExtensionType.Jpg:
            case FileExtensionType.Png:
                return(ImageEncoding.EncodeImage(filePath, extension));

            case FileExtensionType.Svg:
                return(ImageEncoding.EncodeSvg(filePath));

            default:
                return(null);
            }
        }