2 instantiations of HandshakeResult
Microsoft.Build.Tasks.Core (2)
19 references to HandshakeResult
Microsoft.Build.Tasks.Core (19)
CommunicationsUtilities.cs (16)
179/// Initializes a new instance of the <see cref="HandshakeResult"/> class.
198/// <returns>A new <see cref="HandshakeResult"/> instance representing a successful operation.</returns>
199public static HandshakeResult Success(int value = 0, byte negotiatedPacketVersion = 1) => new(HandshakeStatus.Success, value, null, negotiatedPacketVersion);
206/// <returns>A new <see cref="HandshakeResult"/> instance representing a failed operation.</returns>
207public static HandshakeResult Failure(HandshakeStatus status, string errorMessage) => new(status, 0, errorMessage);
489out HandshakeResult result)
497out HandshakeResult innerResult))
517out HandshakeResult versionResult))
545result = HandshakeResult.Success(0, negotiatedPacketVersion);
555private static HandshakeResult CreateVersionMismatchResult(bool isProvider, int receivedValue)
562return HandshakeResult.Failure(HandshakeStatus.VersionMismatch, errorMessage);
576out HandshakeResult result
616result = HandshakeResult.Failure(HandshakeStatus.OldMSBuild, String.Format(CultureInfo.InvariantCulture, "Client: rejected old host. Received byte {0} instead of {1}.", bytes[0], byteToAccept));
624result = HandshakeResult.Failure(HandshakeStatus.UnexpectedEndOfStream, String.Format(CultureInfo.InvariantCulture, "Unexpected end of stream while reading for handshake"));
639result = HandshakeResult.Success(BitConverter.ToInt32(bytes, 0 /* start index */));
643result = HandshakeResult.Failure(HandshakeStatus.EndiannessMismatch, String.Format(CultureInfo.InvariantCulture, "Failed to convert the handshake to big-endian. {0}", ex.Message));