Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Commit

Permalink
Update packages to Orleans 2.3.0 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
galvesribeiro authored Mar 20, 2019
1 parent 96fa79f commit a0f3be3
Show file tree
Hide file tree
Showing 8 changed files with 812 additions and 789 deletions.
157 changes: 79 additions & 78 deletions src/Orleans.Clustering.CosmosDB/ClusteringExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,78 +1,79 @@
using Microsoft.Extensions.DependencyInjection;
using Orleans.Clustering.CosmosDB;
using Orleans.Configuration;
using Orleans.Hosting;
using Orleans.Messaging;
using System;

namespace Orleans.Hosting
{
public static class ClusteringExtensions
{
public static ISiloHostBuilder UseCosmosDBMembership(this ISiloHostBuilder builder,
Action<CosmosDBClusteringOptions> configureOptions)
{
return builder.ConfigureServices(services => services.UseCosmosDBMembership(configureOptions));
}

public static ISiloHostBuilder UseCosmosDBMembership(this ISiloHostBuilder builder,
Action<OptionsBuilder<CosmosDBClusteringOptions>> configureOptions)
{
return builder.ConfigureServices(services => services.UseCosmosDBMembership(configureOptions));
}

public static ISiloHostBuilder UseCosmosDBMembership(this ISiloHostBuilder builder)
{
return builder.ConfigureServices(services =>
{
services.AddOptions<CosmosDBClusteringOptions>();
services.AddSingleton<IMembershipTable, CosmosDBMembershipTable>();
});
}

public static IClientBuilder UseCosmosDBGatewayListProvider(this IClientBuilder builder, Action<CosmosDBGatewayOptions> configureOptions)
{
return builder.ConfigureServices(services => services.UseCosmosDBGatewayListProvider(configureOptions));
}

public static IClientBuilder UseCosmosDBGatewayListProvider(this IClientBuilder builder)
{
return builder.ConfigureServices(services =>
{
services.AddOptions<CosmosDBGatewayOptions>();
services.AddSingleton<IGatewayListProvider, CosmosDBGatewayListProvider>();
});
}

public static IClientBuilder UseCosmosDBGatewayListProvider(this IClientBuilder builder, Action<OptionsBuilder<CosmosDBGatewayOptions>> configureOptions)
{
return builder.ConfigureServices(services => services.UseCosmosDBGatewayListProvider(configureOptions));
}

public static IServiceCollection UseCosmosDBMembership(this IServiceCollection services,
Action<CosmosDBClusteringOptions> configureOptions)
{
return services.UseCosmosDBMembership(ob => ob.Configure(configureOptions));
}

public static IServiceCollection UseCosmosDBMembership(this IServiceCollection services,
Action<OptionsBuilder<CosmosDBClusteringOptions>> configureOptions)
{
configureOptions?.Invoke(services.AddOptions<CosmosDBClusteringOptions>());
return services.AddSingleton<IMembershipTable, CosmosDBMembershipTable>();
}

public static IServiceCollection UseCosmosDBGatewayListProvider(this IServiceCollection services,
Action<CosmosDBGatewayOptions> configureOptions)
{
return services.UseCosmosDBGatewayListProvider(ob => ob.Configure(configureOptions));
}

public static IServiceCollection UseCosmosDBGatewayListProvider(this IServiceCollection services,
Action<OptionsBuilder<CosmosDBGatewayOptions>> configureOptions)
{
configureOptions?.Invoke(services.AddOptions<CosmosDBGatewayOptions>());
return services.AddSingleton<IGatewayListProvider, CosmosDBGatewayListProvider>();
}
}
}
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Orleans.Clustering.CosmosDB;
using Orleans.Configuration;
using Orleans.Hosting;
using Orleans.Messaging;
using System;

namespace Orleans.Hosting
{
public static class ClusteringExtensions
{
public static ISiloHostBuilder UseCosmosDBMembership(this ISiloHostBuilder builder,
Action<CosmosDBClusteringOptions> configureOptions)
{
return builder.ConfigureServices(services => services.UseCosmosDBMembership(configureOptions));
}

public static ISiloHostBuilder UseCosmosDBMembership(this ISiloHostBuilder builder,
Action<OptionsBuilder<CosmosDBClusteringOptions>> configureOptions)
{
return builder.ConfigureServices(services => services.UseCosmosDBMembership(configureOptions));
}

public static ISiloHostBuilder UseCosmosDBMembership(this ISiloHostBuilder builder)
{
return builder.ConfigureServices(services =>
{
services.AddOptions<CosmosDBClusteringOptions>();
services.AddSingleton<IMembershipTable, CosmosDBMembershipTable>();
});
}

public static IClientBuilder UseCosmosDBGatewayListProvider(this IClientBuilder builder, Action<CosmosDBGatewayOptions> configureOptions)
{
return builder.ConfigureServices(services => services.UseCosmosDBGatewayListProvider(configureOptions));
}

public static IClientBuilder UseCosmosDBGatewayListProvider(this IClientBuilder builder)
{
return builder.ConfigureServices(services =>
{
services.AddOptions<CosmosDBGatewayOptions>();
services.AddSingleton<IGatewayListProvider, CosmosDBGatewayListProvider>();
});
}

public static IClientBuilder UseCosmosDBGatewayListProvider(this IClientBuilder builder, Action<OptionsBuilder<CosmosDBGatewayOptions>> configureOptions)
{
return builder.ConfigureServices(services => services.UseCosmosDBGatewayListProvider(configureOptions));
}

public static IServiceCollection UseCosmosDBMembership(this IServiceCollection services,
Action<CosmosDBClusteringOptions> configureOptions)
{
return services.UseCosmosDBMembership(ob => ob.Configure(configureOptions));
}

public static IServiceCollection UseCosmosDBMembership(this IServiceCollection services,
Action<OptionsBuilder<CosmosDBClusteringOptions>> configureOptions)
{
configureOptions?.Invoke(services.AddOptions<CosmosDBClusteringOptions>());
return services.AddSingleton<IMembershipTable, CosmosDBMembershipTable>();
}

public static IServiceCollection UseCosmosDBGatewayListProvider(this IServiceCollection services,
Action<CosmosDBGatewayOptions> configureOptions)
{
return services.UseCosmosDBGatewayListProvider(ob => ob.Configure(configureOptions));
}

public static IServiceCollection UseCosmosDBGatewayListProvider(this IServiceCollection services,
Action<OptionsBuilder<CosmosDBGatewayOptions>> configureOptions)
{
configureOptions?.Invoke(services.AddOptions<CosmosDBGatewayOptions>());
return services.AddSingleton<IGatewayListProvider, CosmosDBGatewayListProvider>();
}
}
}
Loading

0 comments on commit a0f3be3

Please sign in to comment.