コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the Chaos class.
 /// </summary>
 /// <param name="chaosParameters">If Chaos is running, these are the parameters Chaos is running with.</param>
 /// <param name="status">Current status of the Chaos run.
 /// . Possible values include: 'Invalid', 'Running', 'Stopped'</param>
 /// <param name="scheduleStatus">Current status of the schedule.
 /// . Possible values include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending'</param>
 public Chaos(
     ChaosParameters chaosParameters = default(ChaosParameters),
     ChaosStatus?status = default(ChaosStatus?),
     ChaosScheduleStatus?scheduleStatus = default(ChaosScheduleStatus?))
 {
     this.ChaosParameters = chaosParameters;
     this.Status          = status;
     this.ScheduleStatus  = scheduleStatus;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the StartedChaosEvent class.
 /// </summary>
 /// <param name="timeStampUtc">The UTC timestamp when this Chaos event was generated.</param>
 /// <param name="chaosParameters">Defines all the parameters to configure a Chaos run.
 /// </param>
 public StartedChaosEvent(
     DateTime?timeStampUtc,
     ChaosParameters chaosParameters = default(ChaosParameters))
     : base(
         timeStampUtc,
         Common.ChaosEventKind.Started)
 {
     this.ChaosParameters = chaosParameters;
 }
 /// <summary>
 /// Initializes a new instance of the ChaosParametersDictionaryItem class.
 /// </summary>
 /// <param name="key">The key identifying the Chaos Parameter in the dictionary. This key is referenced by Chaos
 /// Schedule Jobs.</param>
 /// <param name="value">Defines all the parameters to configure a Chaos run.
 /// </param>
 public ChaosParametersDictionaryItem(
     string key,
     ChaosParameters value)
 {
     key.ThrowIfNull(nameof(key));
     value.ThrowIfNull(nameof(value));
     this.Key   = key;
     this.Value = value;
 }