Пример #1
0
 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;
 }
Пример #2
0
 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.
     }
 }
Пример #3
0
 internal NodeCommandResult(NodeResult nodeResult, int errorCode)
 {
     this.NodeResult = nodeResult;
     this.ErrorCode  = errorCode;
 }
Пример #4
0
 internal NodeCommandResult(NodeResult nodeResult, Exception exception)
 {
     this.NodeResult = nodeResult;
     this.Exception  = exception;
 }