Dev2.JPropertyExtensionMethods.IsEnumerableOfPrimitives C# (CSharp) Method

IsEnumerableOfPrimitives() public static method

public static IsEnumerableOfPrimitives ( this property ) : bool
property this
return bool
        public static bool IsEnumerableOfPrimitives(this JProperty property)
        {
            bool returnValue = false;
            var array = property.Value as JArray;

            if (array != null && array.Count > 0)
            {
                returnValue = array[0].IsPrimitive();
            }

            return returnValue;
        }