コード例 #1
0
        internal unsafe IntPtr ToNative(PinCollection pinCollection)
        {
            var nativeProgress = new NativeTypes.FABRIC_PARTITION_DATA_LOSS_PROGRESS();

            nativeProgress.State  = TestCommandStateHelper.ToNative(this.State);
            nativeProgress.Result = this.Result.ToNative(pinCollection);
            return(pinCollection.AddBlittable(nativeProgress));
        }
コード例 #2
0
        internal static unsafe PartitionDataLossProgress FromNative(IntPtr pointer)
        {
            NativeTypes.FABRIC_PARTITION_DATA_LOSS_PROGRESS nativeProgress = *(NativeTypes.FABRIC_PARTITION_DATA_LOSS_PROGRESS *)pointer;
            var state = TestCommandStateHelper.FromNative(nativeProgress.State);

            PartitionDataLossResult result = null;

            if (nativeProgress.Result != IntPtr.Zero)
            {
                result = new PartitionDataLossResult();
                result.CreateFromNative(nativeProgress.Result);
            }

            return(new PartitionDataLossProgress(state, result));
        }