From a5712e330cb168e7d73ab630a71edff3ba7d1af0 Mon Sep 17 00:00:00 2001 From: KevinDockx Date: Mon, 2 Mar 2015 17:40:14 +0100 Subject: [PATCH] Cleanup --- .../Helpers/PropertyHelpers.cs | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/src/Marvin.JsonPatch/Helpers/PropertyHelpers.cs b/src/Marvin.JsonPatch/Helpers/PropertyHelpers.cs index 177ab06..78118f0 100644 --- a/src/Marvin.JsonPatch/Helpers/PropertyHelpers.cs +++ b/src/Marvin.JsonPatch/Helpers/PropertyHelpers.cs @@ -191,44 +191,6 @@ private static PropertyInfo GetPropertyInfo(object targetObject, string property } - //public static bool CheckIfPropertyExists(object targetObject, string propertyPath) - //{ - // try - // { - - // var splitPath = propertyPath.Split('/'); - - // // skip the first one if it's empty - // var startIndex = (string.IsNullOrWhiteSpace(splitPath[0]) ? 1 : 0); - - // for (int i = startIndex; i < splitPath.Length - 1; i++) - // { - // var propertyInfoToGet = GetPropertyInfo(targetObject, splitPath[i] - // , BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance); - // targetObject = propertyInfoToGet.GetValue(targetObject, null); - // } - - // // for dynamic objects - // if (targetObject is IDynamicMetaObjectProvider) - // { - // var target = targetObject as IDynamicMetaObjectProvider; - // var propList = target.GetMetaObject(Expression.Constant(target)).GetDynamicMemberNames(); - // return propList.Contains(splitPath.Last()); - // } - // else - // { - // var propertyToCheck = targetObject.GetType().GetProperty(splitPath.Last(), - // BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance); - - // return propertyToCheck != null; - // } - - // } - // catch (Exception) - // { - // return false; - // } - //} } } \ No newline at end of file