internal static unsafe ScalingPolicyDescription CreateFromNative(IntPtr intPtr) { NativeTypes.FABRIC_SCALING_POLICY *casted = (NativeTypes.FABRIC_SCALING_POLICY *)intPtr; var scalingMechanism = ScalingMechanismDescription.CreateFromNative(casted->ScalingPolicyMechanism); var scalingTrigger = ScalingTriggerDescription.CreateFromNative(casted->ScalingPolicyTrigger); return(new ScalingPolicyDescription(scalingMechanism, scalingTrigger)); }
internal static ScalingMechanismDescription GetCopy(ScalingMechanismDescription other) { if (other is PartitionInstanceCountScaleMechanism) { return(new PartitionInstanceCountScaleMechanism(other as PartitionInstanceCountScaleMechanism)); } else if (other is AddRemoveIncrementalNamedPartitionScalingMechanism) { return(new AddRemoveIncrementalNamedPartitionScalingMechanism(other as AddRemoveIncrementalNamedPartitionScalingMechanism)); } else { return(null); } }
internal static ScalingPolicyDescription GetCopy(ScalingPolicyDescription other) { return(new ScalingPolicyDescription(ScalingMechanismDescription.GetCopy(other.ScalingMechanism), ScalingTriggerDescription.GetCopy(other.ScalingTrigger))); }
/// <summary> /// <para>Initializes a new instance of the <see cref="System.Fabric.Description.ScalingPolicyDescription" /> class with the specified mechanism and trigger. </para> /// </summary> public ScalingPolicyDescription(ScalingMechanismDescription mechanism, ScalingTriggerDescription trigger) { ScalingMechanism = mechanism; ScalingTrigger = trigger; }