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