internal static unsafe InvokeDataLossDescription CreateFromNative(IntPtr nativeRaw)
        {
            NativeTypes.FABRIC_START_PARTITON_DATA_LOSS_DESCRIPTION native = *(NativeTypes.FABRIC_START_PARTITON_DATA_LOSS_DESCRIPTION *)nativeRaw;

            Guid operationId = native.OperationId;

            NativeTypes.FABRIC_PARTITION_SELECTOR nativePartitionSelector = *(NativeTypes.FABRIC_PARTITION_SELECTOR *)native.PartitionSelector;

            PartitionSelector partitionSelector =
                PartitionSelector.CreateFromNative(nativePartitionSelector);

            return(new InvokeDataLossDescription(operationId, partitionSelector, (DataLossMode)native.DataLossMode));
        }
        internal IntPtr ToNative(PinCollection pinCollection)
        {
            var nativeInvokeDataLossDescription = new NativeTypes.FABRIC_START_PARTITON_DATA_LOSS_DESCRIPTION();

            nativeInvokeDataLossDescription.OperationId = this.OperationId;

            if (this.PartitionSelector != null)
            {
                nativeInvokeDataLossDescription.PartitionSelector = this.PartitionSelector.ToNative(pinCollection);
            }

            nativeInvokeDataLossDescription.DataLossMode = (NativeTypes.FABRIC_DATA_LOSS_MODE) this.DataLossMode;

            return(pinCollection.AddBlittable(nativeInvokeDataLossDescription));
        }