Пример #1
0
        public static void To(this IToEndPointBuilder builder, string connectionstring, string path)
        {
            if (string.IsNullOrWhiteSpace(connectionstring))
            {
                throw new ArgumentNullException(nameof(connectionstring));
            }

            if (string.IsNullOrWhiteSpace(path))
            {
                throw new ArgumentNullException(nameof(path));
            }

            Func <IValueSettingFinder, string> extractor = x => connectionstring;

            builder.To <NullValueSettingFinder>(extractor, path);
        }
Пример #2
0
 public static void To <TExtractorConnectionString>(this IToEndPointBuilder builder, Func <IValueSettingFinder, string> connectionstringextractor, string path) where TExtractorConnectionString : IValueSettingFinder
 {
     builder.To(x => x.Add <TExtractorConnectionString>(connectionstringextractor, path));
 }