summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Utilities/ExtensionMethods.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/ExtensionMethods.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/ExtensionMethods.cs45
1 files changed, 0 insertions, 45 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/ExtensionMethods.cs b/win/CS/HandBrake.ApplicationServices/Utilities/ExtensionMethods.cs
deleted file mode 100644
index 9966002c7..000000000
--- a/win/CS/HandBrake.ApplicationServices/Utilities/ExtensionMethods.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="ExtensionMethods.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>
-// The extension methods.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.ApplicationServices.Utilities
-{
- using System.Linq.Expressions;
- using System.Reflection;
-
- /// <summary>
- /// The extension methods.
- /// </summary>
- public static class ExtensionMethods
- {
- /// <summary>
- /// Converts an expression into a <see cref="MemberInfo"/>.
- /// </summary>
- /// <param name="expression">
- /// The expression to convert.
- /// </param>
- /// <returns>
- /// The member info.
- /// </returns>
- public static MemberInfo GetMemberInfo(this Expression expression)
- {
- var lambda = (LambdaExpression)expression;
-
- MemberExpression memberExpression;
- if (lambda.Body is UnaryExpression)
- {
- var unaryExpression = (UnaryExpression)lambda.Body;
- memberExpression = (MemberExpression)unaryExpression.Operand;
- }
- else
- memberExpression = (MemberExpression)lambda.Body;
-
- return memberExpression.Member;
- }
- }
-}