public static string ValueProviderToString(IValueProvider provider) { Contract.Assert(provider != null); CompositeValueProvider composite = provider as CompositeValueProvider; if (composite == null) { return(provider.GetType().Name); } string providerList = string.Join(", ", composite.Select <IValueProvider, string>(ValueProviderToString)); return(provider.GetType().Name + "(" + providerList + ")"); }