// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ namespace Microsoft.Graph { using System; using System.Collections.Generic; using System.Net.Http; /// /// The Chaos Hander Option middleware class /// public class ChaosHandlerOption : IMiddlewareOption { /// /// Percentage of responses that will have KnownChaos responses injected, assuming no PlannedChaosFactory is provided /// public int ChaosPercentLevel { get; set; } = 10; /// /// List of failure responses that potentially could be returned when /// public List KnownChaos { get; set; } = null; /// /// Function to return chaos response based on current request. This is used to reproduce detected failure modes. /// public Func PlannedChaosFactory { get; set; } = null; } }