public static IReflectionAccessor Create(MemberExpression rootExpression) { if (rootExpression == null) throw new ArgumentNullException("rootExpression"); var accessor = new RecursiveAccessor(rootExpression); // minimum optimization return (accessor.AccessorCount == 1) ? accessor.GetFirstAccessor() : accessor; }
public static IReflectionAccessor Create(MemberExpression rootExpression) { if (rootExpression == null) { throw new ArgumentNullException("rootExpression"); } var accessor = new RecursiveAccessor(rootExpression); // minimum optimization return((accessor.AccessorCount == 1) ? accessor.GetFirstAccessor() : accessor); }