using WebApi;

namespace Microsoft.AspNetCore.Builder
{
    public static class AppBuilderUseExtensions
    {
        public static IApplicationBuilder AddOneDriveStorage(this IApplicationBuilder app, string key, string clientId, string scope, string username, string password)
        {
            var oneDriveStorageProvider = new OneDriveStorageProvider(clientId, scope, username, password);
            app.UseStorageProviders().Add(key, oneDriveStorageProvider);
            return app;
        }
    }
}