internal unsafe void ParsePlacementPolicies(uint count, IntPtr array) { if (count == 0) { return; } ReleaseAssert.AssertIfNot(array != IntPtr.Zero, StringResources.Error_NullArrayWithNonZeroSize); var nativePolicies = (NativeTypes.FABRIC_SERVICE_PLACEMENT_POLICY_DESCRIPTION *)array; for (int i = 0; i < count; i++) { var item = ServicePlacementPolicyDescription.CreateFromNative((IntPtr)(nativePolicies + i)); this.PlacementPolicies.Add(item); } }
/// <summary> /// <para> /// Constructor for a ServicePlacementPolicyDescription /// </para> /// </summary> /// <param name="other"> /// <para> The ServicePlacementPolicyDescription that the new object should be constructed from.</para> /// </param> protected ServicePlacementPolicyDescription(ServicePlacementPolicyDescription other) { this.Type = other.Type; }