internal unsafe IntPtr ToNative(PinCollection pinCollection) { var nativeProgress = new NativeTypes.FABRIC_PARTITION_QUORUM_LOSS_PROGRESS(); nativeProgress.State = TestCommandStateHelper.ToNative(this.State); nativeProgress.Result = this.Result.ToNative(pinCollection); return(pinCollection.AddBlittable(nativeProgress)); }
internal static unsafe PartitionQuorumLossProgress FromNative(IntPtr pointer) { NativeTypes.FABRIC_PARTITION_QUORUM_LOSS_PROGRESS nativeProgress = *(NativeTypes.FABRIC_PARTITION_QUORUM_LOSS_PROGRESS *)pointer; var state = TestCommandStateHelper.FromNative(nativeProgress.State); PartitionQuorumLossResult result = null; if (nativeProgress.Result != IntPtr.Zero) { result = new PartitionQuorumLossResult(); result.CreateFromNative(nativeProgress.Result); } return(new PartitionQuorumLossProgress(state, result)); }