summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Converters/EnumToDescConverter.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-03-17 22:33:48 +0000
committersr55 <[email protected]>2017-03-17 22:33:48 +0000
commitefabefce58e323bc453aa7f7e65004d8880f9efa (patch)
tree79505319e9a1b46f6ef77dfc4290364525668a6c /win/CS/HandBrakeWPF/Converters/EnumToDescConverter.cs
parent6c6570a326e12edb04498b3272b916eb8d431319 (diff)
WinGui: Remove Usage of System.ComponentModel.DataAnnotations - DisplayName as it's not currently compatible with .NET standard.
Diffstat (limited to 'win/CS/HandBrakeWPF/Converters/EnumToDescConverter.cs')
-rw-r--r--win/CS/HandBrakeWPF/Converters/EnumToDescConverter.cs62
1 files changed, 0 insertions, 62 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/EnumToDescConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumToDescConverter.cs
deleted file mode 100644
index 43c175e20..000000000
--- a/win/CS/HandBrakeWPF/Converters/EnumToDescConverter.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="EnumToDescConverter.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Enum to Description Converter
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.ApplicationServices.Converters
-{
- using System;
- using System.ComponentModel;
-
- using HandBrake.ApplicationServices.Utilities;
-
- using HandBrakeWPF.Utilities;
-
- /// <summary>
- /// Enum to Description Converter
- /// </summary>
- public class EnumToDescConverter : EnumConverter
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="EnumToDescConverter"/> class.
- /// </summary>
- /// <param name="type">
- /// The type.
- /// </param>
- public EnumToDescConverter(Type type)
- : base(type)
- {
- }
-
- /// <summary>
- /// Convert To an Object.
- /// </summary>
- /// <param name="context">
- /// The context.
- /// </param>
- /// <param name="culture">
- /// The culture.
- /// </param>
- /// <param name="value">
- /// The value.
- /// </param>
- /// <param name="destinationType">
- /// The destination type.
- /// </param>
- /// <returns>
- /// The Enum Object
- /// </returns>
- public override object ConvertTo(
- ITypeDescriptorContext context,
- System.Globalization.CultureInfo culture,
- object value,
- Type destinationType)
- {
- return EnumHelper<Enum>.GetDescription((Enum)value);
- }
- }
-}