コード例 #1
0
        protected override SimpleOnPremiseEngine NewEngine(List <string> properties)
        {
            if (DataFileConfigs.Count != 1)
            {
                throw new Exception(
                          "This builder requires one and only one configured file " +
                          $"but it has {DataFileConfigs.Count}");
            }
            var config = DataFileConfigs.First();

            return(new SimpleOnPremiseEngine(
                       config.DataFilePath,
                       _loggerFactory.CreateLogger <SimpleOnPremiseEngine>(),
                       CreateData,
                       TempDir));
        }
コード例 #2
0
 /// <summary>
 /// Add a data file for this engine to use.
 /// </summary>
 /// <param name="configuration">
 /// The data file configuration to add to this engine.
 /// </param>
 /// <returns>
 /// This engine builder instance.
 /// </returns>
 public TBuilder AddDataFile(IDataFileConfiguration configuration)
 {
     DataFileConfigs.Add(configuration);
     return(this as TBuilder);
 }