public static IServiceCollection AddCloudFtpBridge(this IServiceCollection services, IConfiguration configuration, Action <CloudFtpBridgeAppBuilder> configureApp) { services .Configure <CoreOptions>(configuration.GetSection("CloudFtpBridge")) .AddSingleton <FileSystemActivator>() .AddSingleton <WorkflowRunner>(); var builder = new CloudFtpBridgeAppBuilder(services); configureApp(builder); return(services); }
public static CloudFtpBridgeAppBuilder UseLiteDBStorage(this CloudFtpBridgeAppBuilder builder, Action <LiteDBOptions> configure = null) { Directory.CreateDirectory(PathHelper.GetDefaultStoragePath()); configure = configure ?? new Action <LiteDBOptions>(o => { }); builder.Configure(configure); builder .AddSingleton <IAuditLog, LiteDBAuditLog>() .AddSingleton <IWorkflowRepository, LiteDBWorkflowRepository>(); return(builder); }
public static CloudFtpBridgeAppBuilder UseSmtpMailSender(this CloudFtpBridgeAppBuilder builder) { builder.AddTransient <IMailSender, SmtpMailSender>(); return(builder); }
public static CloudFtpBridgeAppBuilder UseJsonMailSettingsProvider(this CloudFtpBridgeAppBuilder builder) { builder.AddSingleton <IMailSettingsProvider, JsonMailSettingsProvider>(); return(builder); }
public static CloudFtpBridgeAppBuilder UseLocalFileSystem(this CloudFtpBridgeAppBuilder builder) { builder.AddTransient <LocalFileSystem>(); return(builder); }
public static CloudFtpBridgeAppBuilder UseLiteDBLegacyStorage(this CloudFtpBridgeAppBuilder builder) { builder.AddSingleton <ILegacyDataProvider, LiteDBLegacyDataProvider>(); return(builder); }