2 instantiations of HandshakeResult
MSBuildTaskHost (2)
CommunicationsUtilities.cs (2)
171=> new(HandshakeStatus.Success, value, null, negotiatedPacketVersion); 180=> new(status, value: 0, errorMessage);
14 references to HandshakeResult
MSBuildTaskHost (14)
BackEnd\NodeEndpointOutOfProcTaskHost.cs (1)
286out HandshakeResult result))
CommunicationsUtilities.cs (13)
170public static HandshakeResult Success(int value = 0, byte negotiatedPacketVersion = 1) 179public static HandshakeResult Failure(HandshakeStatus status, string errorMessage) 486internal static bool TryReadEndOfHandshakeSignal(this PipeStream stream, bool isProvider, out HandshakeResult result) 489if (stream.TryReadIntForHandshake(byteToAccept: null, out HandshakeResult innerResult)) 504if (!stream.TryReadIntForHandshake(byteToAccept: null, out HandshakeResult versionResult)) 527result = HandshakeResult.Success(0, negotiatedPacketVersion); 537private static HandshakeResult CreateVersionMismatchResult(bool isProvider, int receivedValue) 545return HandshakeResult.Failure(HandshakeStatus.VersionMismatch, errorMessage); 552internal static bool TryReadIntForHandshake(this PipeStream stream, byte? byteToAccept, out HandshakeResult result) 562result = HandshakeResult.Failure(HandshakeStatus.OldMSBuild, string.Format(CultureInfo.InvariantCulture, "Client: rejected old host. Received byte {0} instead of {1}.", bytes[0], byteToAccept)); 570result = HandshakeResult.Failure(HandshakeStatus.UnexpectedEndOfStream, "Unexpected end of stream while reading for handshake"); 584result = HandshakeResult.Success(BitConverter.ToInt32(bytes, startIndex: 0)); 588result = HandshakeResult.Failure(HandshakeStatus.EndiannessMismatch, $"Failed to convert the handshake to big-endian. {ex.Message}");