Пример #1
0
        /// <summary>
        /// Returns a list of strings as one string.
        /// </summary>
        /// <param name="handle">The handle.</param>
        /// <param name="propertyName">The property name.</param>
        /// <param name="delimiter">The delimiter for the list.</param>
        /// <returns></returns>
        private static string GetListAsString(IFCAnyHandle handle, string propertyName, string delimiter)
        {
            List <string> propertyList = IFCAnyHandleUtil.GetAggregateStringAttribute <List <string> >(handle, propertyName);

            if (propertyList.Count == 0)
            {
                return(null);
            }

            string valueAsString = null;

            foreach (string propertyValue in propertyList)
            {
                if (string.IsNullOrWhiteSpace(propertyValue))
                {
                    continue;
                }
                ConcatenateString(valueAsString, delimiter, propertyValue);
            }

            return(valueAsString);
        }