public MediaService( IMediaRepository <TMedia> mediaRepository, IAbpStorageFactory storageFactory) { _mediaRepository = mediaRepository; _store = storageFactory.GetStore(DefaultStoreName); }
public AbpStoreProxy(IAbpStorageFactory factory, IOptions <TOptions> options) { if (options == null) { throw new ArgumentNullException(nameof(options), "Unable to build generic Store. Did you forget to configure your options?"); } _innerStore = factory.GetStore(options.Value.Name, options.Value); }
public bool TryGetStore(string storeName, out IAbpStore store, string providerName) { var configuration = _options.GetStoreConfiguration(storeName, throwIfNotFound: false); if (configuration != null) { var provider = GetProvider(configuration, throwIfNotFound: false); if (provider != null && provider.Name == providerName) { store = provider.BuildStore(storeName); return(true); } } store = null; return(false); }
public static ValueTask <IFileReference[]> ListAsync(this IAbpStore store, string path, bool recursive = false, bool withMetadata = false) { return(store.ListAsync(path, recursive, withMetadata)); }
public static ValueTask <IFileReference> SaveAsync(this IAbpStore store, Stream data, string path, string contentType, OverwritePolicy overwritePolicy = OverwritePolicy.Always, IDictionary <string, string> metadata = null) { return(store.SaveAsync(data, new PrivateFileReference(path), contentType, overwritePolicy, metadata)); }
public static ValueTask <string> ReadAllTextAsync(this IAbpStore store, string path) { return(store.ReadAllTextAsync(new PrivateFileReference(path))); }
public static ValueTask <IFileReference> GetAsync(this IAbpStore store, string path, bool withMetadata = false) { return(store.GetAsync(new PrivateFileReference(path), withMetadata)); }
public static Task DeleteAsync(this IAbpStore store, string path) { return(store.DeleteAsync(new PrivateFileReference(path))); }
public MediaService(IMediaRepository mediaRepository, IAbpStorageFactory storageFactory) { _mediaRepository = mediaRepository; _mediaStore = storageFactory.GetStore(HitCommerceConsts.DefaultMediaStoreName); }
public AbpStoreBase(string storeName, IAbpStorageFactory storageFactory) { _store = storageFactory.GetStore(storeName); }