2 instantiations of HandshakeResult
Microsoft.Build.Tasks.Core (2)
19 references to HandshakeResult
Microsoft.Build.Tasks.Core (19)
CommunicationsUtilities.cs (16)
180/// Initializes a new instance of the <see cref="HandshakeResult"/> class.
199/// <returns>A new <see cref="HandshakeResult"/> instance representing a successful operation.</returns>
200public static HandshakeResult Success(int value = 0, byte negotiatedPacketVersion = 1) => new(HandshakeStatus.Success, value, null, negotiatedPacketVersion);
207/// <returns>A new <see cref="HandshakeResult"/> instance representing a failed operation.</returns>
208public static HandshakeResult Failure(HandshakeStatus status, string errorMessage) => new(status, 0, errorMessage);
760out HandshakeResult result)
768out HandshakeResult innerResult))
788out HandshakeResult versionResult))
816result = HandshakeResult.Success(0, negotiatedPacketVersion);
826private static HandshakeResult CreateVersionMismatchResult(bool isProvider, int receivedValue)
833return HandshakeResult.Failure(HandshakeStatus.VersionMismatch, errorMessage);
847out HandshakeResult result
887result = HandshakeResult.Failure(HandshakeStatus.OldMSBuild, String.Format(CultureInfo.InvariantCulture, "Client: rejected old host. Received byte {0} instead of {1}.", bytes[0], byteToAccept));
895result = HandshakeResult.Failure(HandshakeStatus.UnexpectedEndOfStream, String.Format(CultureInfo.InvariantCulture, "Unexpected end of stream while reading for handshake"));
910result = HandshakeResult.Success(BitConverter.ToInt32(bytes, 0 /* start index */));
914result = HandshakeResult.Failure(HandshakeStatus.EndiannessMismatch, String.Format(CultureInfo.InvariantCulture, "Failed to convert the handshake to big-endian. {0}", ex.Message));