/// <summary>
        /// Converts to serializable.
        /// </summary>
        /// <param name="memberExpression">The member expression.</param>
        /// <returns>
        /// Serializable expression.
        /// </returns>
        public static MemberExpressionRepresentation ToRepresentation(
            this MemberExpression memberExpression)
        {
            if (memberExpression == null)
            {
                throw new ArgumentNullException(nameof(memberExpression));
            }

            var type = memberExpression.Type.ToRepresentation();

            var expression = memberExpression.Expression.ToRepresentation();

            var memberInfoRepresentation = memberExpression.Member.ToRepresentation();

            var result = new MemberExpressionRepresentation(type, expression, memberInfoRepresentation);

            return(result);
        }
        /// <summary>
        /// From the serializable.
        /// </summary>
        /// <param name="memberExpressionRepresentation">The member expression.</param>
        /// <returns>
        /// Converted expression.
        /// </returns>
        public static MemberExpression FromRepresentation(
            this MemberExpressionRepresentation memberExpressionRepresentation)
        {
            if (memberExpressionRepresentation == null)
            {
                throw new ArgumentNullException(nameof(memberExpressionRepresentation));
            }

            var expression = memberExpressionRepresentation.Expression.FromRepresentation();

            var type = memberExpressionRepresentation.Type.ResolveFromLoadedTypes();

            var member = type.GetMembers().Single(_ => _.ToRepresentation().Equals(memberExpressionRepresentation.MemberInfo));

            var result = Expression.MakeMemberAccess(expression, member);

            return(result);
        }