Microsoft.ResourceManagement.ObjectModel.RmResource.ToString C# (CSharp) Method

ToString() public method

Return a string with the value of the attribute whose name is passed as format. If the attribute is multi valued, returns a string with the concatenation of the values separated by ';'
public ToString ( string format, IFormatProvider formatProvider ) : string
format string
formatProvider IFormatProvider
return string
        public string ToString(
            string format,
            IFormatProvider formatProvider)
        {
            if (string.IsNullOrEmpty(format)) {
                return this.ToString();
            }
            RmAttributeName key = new RmAttributeName(format);
            if (!attributes.ContainsKey(key)) {
                return string.Empty;
            }
            RmAttributeValue value = attributes[key];
            if (value.IsMultiValue) {
                // make an array of string values
                string[] values = value.Values.ConvertAll<string>(x => GetString(x)).ToArray();
                return string.Join("; ", values);
            }
            return GetString(value.Value);
        }