/// <summary>
        /// Starts the node
        /// </summary>
        /// <param name="resourceGroup">The id of the resource group</param>
        /// <returns></returns>
        public async Task StartAsync(string resourceGroup, ContextOptions contextOptions)
        {
            this.cts = new CancellationTokenSource();
            var onChangeActions = new OnChangeActions();

            onChangeActions.AddOnStartAction(StartActivity);
            onChangeActions.AddOnStopAction(CancelActivity);
            onChangeActions.AddOnErrorAction(RaiseError);
            await this.rebalanserProvider.StartAsync(resourceGroup, onChangeActions, this.cts.Token, contextOptions);
        }
Exemple #2
0
        /// <summary>
        /// Starts the node
        /// </summary>
        /// <param name="resourceGroup">The id of the resource group</param>
        /// <returns></returns>
        public async Task StartAsync(string resourceGroup, ClientOptions clientOptions)
        {
            this.cts = new CancellationTokenSource();
            var onChangeActions = new OnChangeActions();

            onChangeActions.AddOnStartAction(StartActivity);
            onChangeActions.AddOnStopAction(StopActivity);
            onChangeActions.AddOnAbortAction(Abort);
            await this.rebalanserProvider.StartAsync(resourceGroup, onChangeActions, this.cts.Token, clientOptions);
        }