internal static unsafe NodeImpact CreateFromNative(NativeTypes.FABRIC_REPAIR_NODE_IMPACT nativeImpact) { var description = new NodeImpact() { NodeName = NativeTypes.FromNativeString(nativeImpact.NodeName), ImpactLevel = (NodeImpactLevel)nativeImpact.ImpactLevel, }; return(description); }
internal override IntPtr ToNativeValue(PinCollection pinCollection) { var nativeArray = new NativeTypes.FABRIC_REPAIR_NODE_IMPACT[this.ImpactedNodes.Count]; for (int i = 0; i < nativeArray.Length; ++i) { nativeArray[i].NodeName = pinCollection.AddBlittable(this.ImpactedNodes[i].NodeName); nativeArray[i].ImpactLevel = (NativeTypes.FABRIC_REPAIR_NODE_IMPACT_LEVEL) this.ImpactedNodes[i].ImpactLevel; } var nativeDescription = new NativeTypes.FABRIC_REPAIR_NODE_IMPACT_LIST(); nativeDescription.Count = (uint)nativeArray.Length; nativeDescription.Items = pinCollection.AddBlittable(nativeArray); return(pinCollection.AddBlittable(nativeDescription)); }