예제 #1
0
        public override string ToString()
        {
            var result = "supplier #" + _dataSupplierId;

            if (SuppliedTypes != null && SuppliedTypes.Count > 0)
            {
                result += " of [" + string.Join(", ", SuppliedTypes.Select(t => t.DisplayName(TypeExtensions.NamespaceOption.Ending))) + "]";
            }
            return(result);
        }
        /// <summary>
        /// Returns the default description
        /// </summary>
        public override string ToString()
        {
            if (!string.IsNullOrEmpty(Name))
            {
                return(Name.ToLower());
            }

            if (SuppliedTypes != null && SuppliedTypes.Count > 0)
            {
                return
                    ("supplier of [" +
                     string.Join(", ", SuppliedTypes.Select(t => t.DisplayName(TypeExtensions.NamespaceOption.None))) +
                     "]");
            }

            if (DefaultSupply != null)
            {
                return("supplier of " + DefaultSupply);
            }

            return("data supplier");
        }