public static IContentBuilder AddMemorySource(this IContentBuilder builder) { if (builder is null) { throw new ArgumentNullException(nameof(builder)); } builder.AddContentSource(() => new MemoryContentSource()); return(builder); }
public static IContentBuilder AddJsonFileSource(this IContentBuilder builder, Action <JsonFileContentSourceOptions> options) { if (options is null) { throw new ArgumentNullException(nameof(options)); } var o = new JsonFileContentSourceOptions(); options(o); builder.AddContentSource(() => new JsonFileContentSource(o.Location)); return(builder); }
public static IContentBuilder AddProtoFileSource(this IContentBuilder builder, string location) { if (builder is null) { throw new ArgumentNullException(nameof(builder)); } if (location is null) { throw new ArgumentNullException(nameof(location)); } builder.AddContentSource(() => new ProtoFileContentSource(location, builder.ContentLogger)); return(builder); }