internal RestartNodeResult(SelectedReplica selectedReplica, NodeResult nodeResult) { ReleaseAssert.AssertIfNull(nodeResult, "Node result cannot be null"); ReleaseAssert.AssertIfNull(selectedReplica, "Selected replica cannot be null"); this.NodeResult = nodeResult; this.SelectedReplica = selectedReplica; }
internal unsafe void CreateFromNative(IntPtr pointer) { NativeTypes.NODE_TRANSITION_RESULT nativeResult = *(NativeTypes.NODE_TRANSITION_RESULT *)pointer; this.NodeResult = NodeResult.CreateFromNative(nativeResult.NodeResult); this.ErrorCode = nativeResult.ErrorCode; try { this.Exception = InteropHelpers.TranslateError(this.ErrorCode); } catch (FabricException) { // Exception could not be translated. To the user, it will look like whole FabricClient API itself failed, // instead of just the translation above, and they won't be able to determine what happened. So // instead, suppress this. The user will still have this.ErrorCode. We will still // be able to catch and fix situations that hit this case in test automation because // there be a check on this.Exception there. } }
internal NodeCommandResult(NodeResult nodeResult, int errorCode) { this.NodeResult = nodeResult; this.ErrorCode = errorCode; }
internal NodeCommandResult(NodeResult nodeResult, Exception exception) { this.NodeResult = nodeResult; this.Exception = exception; }