Beispiel #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (MetricTrigger == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "MetricTrigger");
     }
     if (ScaleAction == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ScaleAction");
     }
     if (MetricTrigger != null)
     {
         MetricTrigger.Validate();
     }
     if (ScaleAction != null)
     {
         ScaleAction.Validate();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the ScaleRuleInner class.
 /// </summary>
 /// <param name="metricTrigger">the trigger that results in a scaling
 /// action.</param>
 /// <param name="scaleAction">the parameters for the scaling
 /// action.</param>
 public ScaleRuleInner(MetricTrigger metricTrigger, ScaleAction scaleAction)
 {
     MetricTrigger = metricTrigger;
     ScaleAction   = scaleAction;
     CustomInit();
 }