# < Summary

Information

Class: | Renci.SshNet.Sftp.Requests.SftpInitRequest
Assembly: | Renci.SshNet
File(s): | \home\appveyor\projects\ssh-net\src\Renci.SshNet\Sftp\Requests\SftpInitRequest.cs

Line coverage
78%

Covered lines: | 15
Uncovered lines: | 4
Coverable lines: | 19
Total lines: | 45
Line coverage: | 78.9%

Branch coverage
N/A

Covered branches: | 0
Total branches: | 0
Branch coverage: | N/A

Method coverage

Feature is only available for sponsors

Upgrade to PRO version

# Metrics

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
get_SftpMessageType() | 100% | 1 | 100%
get_Version() | 100% | 1 | 100%
get_BufferCapacity() | 100% | 1 | 100%
.ctor(...) | 100% | 1 | 100%
LoadData() | 100% | 1 | 0%
SaveData() | 100% | 1 | 100%

# File(s)

## \home\appveyor\projects\ssh-net\src\Renci.SshNet\Sftp\Requests\SftpInitRequest.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `namespace Renci.SshNet.Sftp.Requests`
|  | `2` |  | `{`
|  | `3` |  | `internal sealed class SftpInitRequest : SftpMessage`
|  | `4` |  | `{`
|  | `5` |  | `public override SftpMessageTypes SftpMessageType`
|  | `6` |  | `{`
| 1995 | `7` |  | `get { return SftpMessageTypes.Init; }`
|  | `8` |  | `}`
|  | `9` |  | ``
| 1330 | `10` |  | `public uint Version { get; private set; }`
|  | `11` |  | ``
|  | `12` |  | `/// <summary>`
|  | `13` |  | `/// Gets the size of the message in bytes.`
|  | `14` |  | `/// </summary>`
|  | `15` |  | `/// <value>`
|  | `16` |  | `/// The size of the messages in bytes.`
|  | `17` |  | `/// </value>`
|  | `18` |  | `protected override int BufferCapacity`
|  | `19` |  | `{`
|  | `20` |  | `get`
| 665 | `21` |  | `{`
| 665 | `22` |  | `var capacity = base.BufferCapacity;`
| 665 | `23` |  | `capacity += 4; // Version`
| 665 | `24` |  | `return capacity;`
| 665 | `25` |  | `}`
|  | `26` |  | `}`
|  | `27` |  | ``
| 665 | `28` |  | `public SftpInitRequest(uint version)`
| 665 | `29` |  | `{`
| 665 | `30` |  | `Version = version;`
| 665 | `31` |  | `}`
|  | `32` |  | ``
|  | `33` |  | `protected override void LoadData()`
| 0 | `34` |  | `{`
| 0 | `35` |  | `base.LoadData();`
| 0 | `36` |  | `Version = ReadUInt32();`
| 0 | `37` |  | `}`
|  | `38` |  | ``
|  | `39` |  | `protected override void SaveData()`
| 665 | `40` |  | `{`
| 665 | `41` |  | `base.SaveData();`
| 665 | `42` |  | `Write(Version);`
| 665 | `43` |  | `}`
|  | `44` |  | `}`
|  | `45` |  | `}`

# Methods/Properties

get_SftpMessageType()
get_Version()
get_BufferCapacity()
.ctor(System.UInt32)
LoadData()
SaveData()