# < Summary

Information

Class: | Renci.SshNet.Messages.Authentication.FailureMessage
Assembly: | Renci.SshNet
File(s): | \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Authentication\FailureMessage.cs

Line coverage
85%

Covered lines: | 17
Uncovered lines: | 3
Coverable lines: | 20
Total lines: | 72
Line coverage: | 85%

Branch coverage
100%

Covered branches: | 2
Total branches: | 2
Branch coverage: | 100%

Method coverage

Feature is only available for sponsors

Upgrade to PRO version

# Metrics

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
get_AllowedAuthentications() | 100% | 1 | 100%
get_Message() | 100% | 1 | 100%
get_PartialSuccess() | 100% | 1 | 100%
LoadData() | 100% | 2 | 100%
SaveData() | 100% | 1 | 0%
Process(...) | 100% | 1 | 100%
ToString() | 100% | 1 | 100%

# File(s)

## \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Authentication\FailureMessage.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System;`
|  | `2` |  | ``
|  | `3` |  | `namespace Renci.SshNet.Messages.Authentication`
|  | `4` |  | `{`
|  | `5` |  | `/// <summary>`
|  | `6` |  | `/// Represents SSH_MSG_USERAUTH_FAILURE message.`
|  | `7` |  | `/// </summary>`
|  | `8` |  | `[Message("SSH_MSG_USERAUTH_FAILURE", 51)]`
|  | `9` |  | `public class FailureMessage : Message`
|  | `10` |  | `{`
|  | `11` |  | `/// <summary>`
|  | `12` |  | `/// Gets or sets the allowed authentications if available.`
|  | `13` |  | `/// </summary>`
|  | `14` |  | `/// <value>`
|  | `15` |  | `/// The allowed authentications.`
|  | `16` |  | `/// </value>`
| 3684 | `17` |  | `public string[] AllowedAuthentications { get; set; }`
|  | `18` |  | ``
|  | `19` |  | `/// <summary>`
|  | `20` |  | `/// Gets failure message.`
|  | `21` |  | `/// </summary>`
| 15 | `22` |  | `public string Message { get; private set; }`
|  | `23` |  | ``
|  | `24` |  | `/// <summary>`
|  | `25` |  | `/// Gets a value indicating whether authentication is partially successful.`
|  | `26` |  | `/// </summary>`
|  | `27` |  | `/// <value>`
|  | `28` |  | `/// <see langword="true"/> if partially successful; otherwise, <see langword="false"/>.`
|  | `29` |  | `/// </value>`
| 4892 | `30` |  | `public bool PartialSuccess { get; private set; }`
|  | `31` |  | ``
|  | `32` |  | `/// <summary>`
|  | `33` |  | `/// Called when type specific data need to be loaded.`
|  | `34` |  | `/// </summary>`
|  | `35` |  | `protected override void LoadData()`
| 1223 | `36` |  | `{`
| 1223 | `37` |  | `AllowedAuthentications = ReadNamesList();`
| 1223 | `38` |  | `PartialSuccess = ReadBoolean();`
| 1223 | `39` |  | `if (PartialSuccess)`
| 15 | `40` |  | `{`
|  | `41` |  | `#if NET || NETSTANDARD2_1_OR_GREATER`
| 15 | `42` |  | `Message = string.Join(',', AllowedAuthentications);`
|  | `43` |  | `#else`
| 0 | `44` |  | `Message = string.Join(",", AllowedAuthentications);`
|  | `45` |  | `#endif // NET || NETSTANDARD2_1_OR_GREATER`
| 15 | `46` |  | `}`
| 1223 | `47` |  | `}`
|  | `48` |  | ``
|  | `49` |  | `/// <summary>`
|  | `50` |  | `/// Called when type specific data need to be saved.`
|  | `51` |  | `/// </summary>`
|  | `52` |  | `protected override void SaveData()`
| 0 | `53` |  | `{`
|  | `54` |  | `#pragma warning disable MA0025 // Implement the functionality instead of throwing NotImplementedException`
| 0 | `55` |  | `throw new NotImplementedException();`
|  | `56` |  | `#pragma warning restore MA0025 // Implement the functionality instead of throwing NotImplementedException`
|  | `57` |  | `}`
|  | `58` |  | ``
|  | `59` |  | `internal override void Process(Session session)`
| 1223 | `60` |  | `{`
| 1223 | `61` |  | `session.OnUserAuthenticationFailureReceived(this);`
| 1223 | `62` |  | `}`
|  | `63` |  | ``
|  | `64` |  | `/// <inheritdoc/>`
|  | `65` |  | `public override string ToString()`
| 1223 | `66` |  | `{`
|  | `67` |  | `#pragma warning disable MA0089 // Optimize string method usage`
| 1223 | `68` |  | `return $"SSH_MSG_USERAUTH_FAILURE {string.Join(",", AllowedAuthentications)} ({nameof(PartialSuccess)}:{Part`
|  | `69` |  | `#pragma warning restore MA0089 // Optimize string method usage`
| 1223 | `70` |  | `}`
|  | `71` |  | `}`
|  | `72` |  | `}`

# Methods/Properties

get_AllowedAuthentications()
get_Message()
get_PartialSuccess()
LoadData()
SaveData()
Process(Renci.SshNet.Session)
ToString()