Topic "resume support is read only WINSCP5.2.4BETA"

Author Message
rjthannam
[View user's profile]

Joined: 2013-09-27
Posts: 1
Location: United Kingdom
Hi - Thanks for fixing the transfer resume support in the .net library however I cant set the state as the resume support property is set to be read-only

running windows 8 with 3.5 framework

my code for setting resume state
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;

TransferResumeSupport trs = null; //no constructor so i leave as null to create object
trs.State = TransferResumeSupportState.Off;
trs.Threshold = 0;
transferOptions.ResumeSupport = trs; // <-- this line fails as Resume support is read only

Transfer options class
public sealed class TransferOptions
{
public TransferOptions();

public string FileMask { get; set; }
public FilePermissions FilePermissions { get; set; }
public bool PreserveTimestamp { get; set; }
public TransferResumeSupport ResumeSupport { get; }
public TransferMode TransferMode { get; set; }
}

Apologies if this has already been reported I couldn't find any mention of it
Richard
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
An instance of TransferResumeSupport is auto-created by TransferOptions constructor. Just set it's properties.
Code:
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off;
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License