ChaosTest.ChaosService.ChaosService.TestScenarioProgressChanged C# (CSharp) Méthode

TestScenarioProgressChanged() private méthode

This is the event-handler for the events coming into from ChaosTestScenario
private TestScenarioProgressChanged ( object sender, ProgressChangedEventArgs e ) : void
sender object ChaosTestScenario
e System.ComponentModel.ProgressChangedEventArgs Event
Résultat void
        private void TestScenarioProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            string eventString = e.UserState.ToString();

            // Chaos Test Scenario runs in units of iterations; but from this sample's 
            // Chaos service point of view, iteration does not make much sense; hence, 
            // getting rid of pre- and post-, ambles for iterations.
            if (eventString.StartsWith("Running iteration"))
            {
                return;
            }

            if (eventString.StartsWith("Scenario complete"))
            {
                return;
            }

            this.StoreEventAsync(eventString).GetAwaiter().GetResult();
        }