Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the ScaleRule class.
 /// </summary>
 /// <param name="metricTrigger">The metric trigger object</param>
 /// <param name="scaleAction">The scale action object</param>
 public ScaleRule(Monitor.Models.MetricTrigger metricTrigger, Monitor.Models.ScaleAction scaleAction)
     : base(
         metricTrigger: metricTrigger,
         scaleAction: scaleAction)
 {
     this.MetricTrigger = metricTrigger != null ? new MetricTrigger(metricTrigger) : null;
     this.ScaleAction   = scaleAction != null ? new ScaleAction(scaleAction) : null;
 }
 /// <summary>
 /// Initializes a new instance of the ScaleAction class.
 /// </summary>
 /// <param name="scaleAction">The ScaleAction object</param>
 public ScaleAction(Monitor.Models.ScaleAction scaleAction)
     : base()
 {
     if (scaleAction != null)
     {
         base.Cooldown  = scaleAction.Cooldown;
         base.Direction = scaleAction.Direction;
         base.Type      = scaleAction.Type;
         Value          = scaleAction.Value;
         this.Type      = TransitionHelpers.ConvertNamespace(scaleAction.Type);
         this.Direction = TransitionHelpers.ConvertNamespace(scaleAction.Direction);
     }
 }