Ejemplo n.º 1
0
        /// <summary>
        /// Legacy way to create membership table. Will need to move to a legacy package in the future
        /// </summary>
        /// <returns></returns>
        internal static void ConfigureServices(GlobalConfiguration configuration, IServiceCollection services)
        {
            ILegacyMembershipConfigurator configurator = null;

            switch (configuration.LivenessType)
            {
            case LivenessProviderType.MembershipTableGrain:
                configurator = new LegacyGrainBasedMembershipConfigurator();
                break;

            case LivenessProviderType.SqlServer:
                configurator = LegacyGatewayListProviderConfigurator.CreateInstanceWithParameterlessConstructor <ILegacyMembershipConfigurator>(Constants.ORLEANS_CLUSTERING_ADONET);
                break;

            case LivenessProviderType.AzureTable:
                configurator = LegacyGatewayListProviderConfigurator.CreateInstanceWithParameterlessConstructor <ILegacyMembershipConfigurator>(Constants.ORLEANS_CLUSTERING_AZURESTORAGE);
                break;

            case LivenessProviderType.ZooKeeper:
                configurator = LegacyGatewayListProviderConfigurator.CreateInstanceWithParameterlessConstructor <ILegacyMembershipConfigurator>(Constants.ORLEANS_CLUSTERING_ZOOKEEPER);
                break;

            case LivenessProviderType.Custom:
                configurator = LegacyGatewayListProviderConfigurator.CreateInstanceWithParameterlessConstructor <ILegacyMembershipConfigurator>(configuration.MembershipTableAssembly);
                break;

            default:
                break;
            }

            configurator?.ConfigureServices(configuration, services);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Legacy way to create membership table. Will need to move to a legacy package in the future
        /// </summary>
        /// <returns></returns>
        internal static void ConfigureServices(GlobalConfiguration configuration, IServiceCollection services)
        {
            ILegacyMembershipConfigurator configurator = null;

            switch (configuration.LivenessType)
            {
            case LivenessProviderType.MembershipTableGrain:
                configurator = new LegacyGrainBasedMembershipConfigurator();
                break;

            case LivenessProviderType.SqlServer:
                configurator = GetConfigurator(Constants.ORLEANS_SQL_UTILS_DLL);
                break;

            case LivenessProviderType.AzureTable:
                configurator = GetConfigurator(Constants.ORLEANS_AZURE_UTILS_DLL);
                break;

            case LivenessProviderType.ZooKeeper:
                configurator = GetConfigurator(Constants.ORLEANS_ZOOKEEPER_UTILS_DLL);
                break;

            case LivenessProviderType.Custom:
                configurator = GetConfigurator(configuration.MembershipTableAssembly);
                break;

            default:
                break;
            }

            configurator?.ConfigureServices(configuration, services);
        }