private static IConfBlock ValidateBlock(IConfContainer confContainer) { if (null == confContainer) { throw new ArgumentNullException(nameof(confContainer)); } var block = confContainer.Block; if (block == null) { throw new ArgumentException(paramName: nameof(confContainer), message: $"{nameof(confContainer.Block)} is null."); } return(block); }
public static void ConfigureLogging(this IConfContainer confContainer) { Logging.Configuration = new LogConf { Container = confContainer }; }
public void SetUp() { Subject = new ConfContainer(); }
public static IEnumerable <KeyValuePair <string, T> > Configure <T>(this IConfContainer confContainer, Func <string, T> factory, string collection = null, IEqualityComparer <string> comparer = null) { return(ValidateBlock(confContainer).Configure(factory, collection, comparer)); }
public static T Configure <T>(this IConfContainer confContainer, T obj, string key = null) { return(ValidateBlock(confContainer).Configure(obj, key)); }