예제 #1
0
        internal unsafe IntPtr ToNative(PinCollection pinCollection)
        {
            var nativeProgress = new NativeTypes.FABRIC_NODE_TRANSITION_PROGRESS();

            nativeProgress.State  = TestCommandStateHelper.ToNative(this.State);
            nativeProgress.Result = this.Result.ToNative(pinCollection);
            return(pinCollection.AddBlittable(nativeProgress));
        }
예제 #2
0
        internal static unsafe NodeTransitionProgress FromNative(IntPtr pointer)
        {
            NativeTypes.FABRIC_NODE_TRANSITION_PROGRESS nativeProgress = *(NativeTypes.FABRIC_NODE_TRANSITION_PROGRESS *)pointer;
            var state = TestCommandStateHelper.FromNative(nativeProgress.State);
            NodeCommandResult result = null;

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

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