Esempio n. 1
0
        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>();
        }
Esempio n. 2
0
 public FileStore(HybridFSOptions options, IFileStoreContextFactory factory)
 {
     _options = options;
     _factory = factory;
 }
 public SqliteFileStoreContextFactory(HybridFSOptions options)
 {
     _options = options;
 }