Пример #1
0
        internal static unsafe FabricOrchestrationUpgradeProgress FromNative(IntPtr pointer)
        {
            NativeTypes.FABRIC_ORCHESTRATION_UPGRADE_PROGRESS *nativeProgress = (NativeTypes.FABRIC_ORCHESTRATION_UPGRADE_PROGRESS *)pointer;

            FabricOrchestrationUpgradeProgress result = new FabricOrchestrationUpgradeProgress();

            result.UpgradeState   = (FabricUpgradeState)nativeProgress->UpgradeState;
            result.ProgressStatus = nativeProgress->ProgressStatus;

            if (nativeProgress->Reserved != IntPtr.Zero)
            {
                NativeTypes.FABRIC_ORCHESTRATION_UPGRADE_PROGRESS_EX1 *ex1Ptr = (NativeTypes.FABRIC_ORCHESTRATION_UPGRADE_PROGRESS_EX1 *)nativeProgress->Reserved;
                result.ConfigVersion = NativeTypes.FromNativeString(ex1Ptr->ConfigVersion);

                if (ex1Ptr->Reserved != IntPtr.Zero)
                {
                    NativeTypes.FABRIC_ORCHESTRATION_UPGRADE_PROGRESS_EX2 *ex2Ptr = (NativeTypes.FABRIC_ORCHESTRATION_UPGRADE_PROGRESS_EX2 *)ex1Ptr->Reserved;
                    result.Details = NativeTypes.FromNativeString(ex2Ptr->Details);
                }
            }

            return(result);
        }
Пример #2
0
 public OrchestrationUpgradeResult(FabricOrchestrationUpgradeProgress progress)
 {
     this.progress = progress;
 }