public static void AddHybridFS(this IServiceCollection service, Action <HybridFSOptions> action = null) { var options = new HybridFSOptions(); action?.Invoke(options); service.AddSingleton(options); new IdHelperBootstrapper() //设置WorkerId .SetWorkderId(options.WorkderId) .Boot(); service.AddSingleton <IFileStore, FileStore>(); service.AddSingleton <IFileManager, FileManager>(); }
public FileStore(HybridFSOptions options, IFileStoreContextFactory factory) { _options = options; _factory = factory; }
public SqliteFileStoreContextFactory(HybridFSOptions options) { _options = options; }