예제 #1
0
        /// <summary>
        /// Converts to string.
        /// </summary>
        /// <param name="propertyTarget">Elements {!xxx} will get the xxx property from this object, elements {xxx} will get the xxx value from QueryValue(xxx)</param>
        /// <returns>String</returns>
        public static string ConvertToString(this ParseElementCollection self, object propertyTarget, Core core)
        {
            var r = new StringBuilder();

            foreach (var x in self.Contents)
            {
                if (x.IsInBrackets)
                {
                    r.Append(Column.AsString(ColumnManager.QueryProperty(core, propertyTarget, x.Value), EListDisplayMode.Content));
                }
                else
                {
                    r.Append(x.Value);
                }
            }

            return(r.ToString());
        }