Esempio n. 1
0
 T IDebuggable.GetDebugInfo <T>(int parentDepth, int childDepth)
 {
     return(new DebugDataSupplier
     {
         Instance = this,
         Name = "supplier #" + _dataSupplierId,
         SuppliedTypes = SuppliedTypes == null ? null : SuppliedTypes.ToList(),
     } as T);
 }
Esempio n. 2
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");
        }